diff options
Diffstat (limited to 'test/root/root.sh')
-rwxr-xr-x | test/root/root.sh | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/test/root/root.sh b/test/root/root.sh new file mode 100755 index 000000000..9764b3804 --- /dev/null +++ b/test/root/root.sh | |||
@@ -0,0 +1,114 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | # set a new firejail config file | ||
4 | cp firejail.config /etc/firejail/firejail.config | ||
5 | |||
6 | #******************************** | ||
7 | # servers | ||
8 | #******************************** | ||
9 | if [ -f /etc/init.d/snmpd ] | ||
10 | then | ||
11 | echo "TESTING: snmpd (test/root/snmpd.exp)" | ||
12 | ./snmpd.exp | ||
13 | else | ||
14 | echo "TESTING SKIP: snmpd not found" | ||
15 | fi | ||
16 | |||
17 | |||
18 | if [ -f /etc/init.d/apache2 ] | ||
19 | then | ||
20 | echo "TESTING: apache2 (test/root/apache2.exp)" | ||
21 | ./apache2.exp | ||
22 | else | ||
23 | echo "TESTING SKIP: apache2 not found" | ||
24 | fi | ||
25 | |||
26 | if [ -f /etc/init.d/isc-dhcp-server ] | ||
27 | then | ||
28 | echo "TESTING: isc dhcp server (test/root/isc-dhscp.exp)" | ||
29 | ./isc-dhcp.exp | ||
30 | else | ||
31 | echo "TESTING SKIP: isc dhcp server not found" | ||
32 | fi | ||
33 | |||
34 | if [ -f /etc/init.d/unbound ] | ||
35 | then | ||
36 | echo "TESTING: unbound (test/root/unbound.exp)" | ||
37 | ./unbound.exp | ||
38 | else | ||
39 | echo "TESTING SKIP: unbound not found" | ||
40 | fi | ||
41 | |||
42 | if [ -f /etc/init.d/nginx ] | ||
43 | then | ||
44 | echo "TESTING: nginx (test/root/nginx.exp)" | ||
45 | ./nginx.exp | ||
46 | else | ||
47 | echo "TESTING SKIP: nginx not found" | ||
48 | fi | ||
49 | |||
50 | #******************************** | ||
51 | # filesystem | ||
52 | #******************************** | ||
53 | echo "TESTING: fs private (test/root/private.exp)" | ||
54 | ./private.exp | ||
55 | |||
56 | echo "TESTING: fs whitelist mnt, opt, media (test/root/whitelist-mnt.exp)" | ||
57 | ./whitelist.exp | ||
58 | |||
59 | #******************************** | ||
60 | # utils | ||
61 | #******************************** | ||
62 | echo "TESTING: join (test/root/join.exp)" | ||
63 | ./join.exp | ||
64 | |||
65 | #******************************** | ||
66 | # seccomp | ||
67 | #******************************** | ||
68 | echo "TESTING: seccomp umount (test/root/seccomp-umount.exp)" | ||
69 | ./seccomp-umount.exp | ||
70 | |||
71 | echo "TESTING: seccomp chmod (test/root/seccomp-chmod.exp)" | ||
72 | ./seccomp-chmod.exp | ||
73 | |||
74 | echo "TESTING: seccomp chown (test/root/seccomp-chown.exp)" | ||
75 | ./seccomp-chown.exp | ||
76 | |||
77 | #******************************** | ||
78 | # command line options | ||
79 | #******************************** | ||
80 | echo "TESTING: tmpfs (test/root/option_tmpfs.exp)" | ||
81 | ./option_tmpfs.exp | ||
82 | |||
83 | echo "TESTING: profile tmpfs (test/root/profile_tmpfs)" | ||
84 | ./profile_tmpfs.exp | ||
85 | |||
86 | echo "TESTING: bind directory (test/root/option_bind_directory.exp)" | ||
87 | ./option_bind_directory.exp | ||
88 | |||
89 | echo "TESTING: bind file (test/root/option_bind_file.exp)" | ||
90 | echo hello > tmpfile | ||
91 | ./option_bind_file.exp | ||
92 | rm -f tmpfile | ||
93 | |||
94 | #******************************** | ||
95 | # firemon | ||
96 | #******************************** | ||
97 | echo "TESTING: firemon events (test/root/firemon-events.exp)" | ||
98 | ./firemon-events.exp | ||
99 | |||
100 | #******************************** | ||
101 | # firecfg | ||
102 | #******************************** | ||
103 | which firefox | ||
104 | if [ "$?" -eq 0 ]; | ||
105 | then | ||
106 | echo "TESTING: firecfg (test/root/firecfg.exp)" | ||
107 | ./firecfg.exp | ||
108 | else | ||
109 | echo "TESTING SKIP: firecfg, firefox not found" | ||
110 | fi | ||
111 | |||
112 | # restore the default config file | ||
113 | cp ../../etc/firejail.config /etc/firejail/firejail.config | ||
114 | |||