diff options
Diffstat (limited to 'test/root/root.sh')
-rwxr-xr-x | test/root/root.sh | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/test/root/root.sh b/test/root/root.sh new file mode 100755 index 000000000..494bd4fe7 --- /dev/null +++ b/test/root/root.sh | |||
@@ -0,0 +1,105 @@ | |||
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 | #******************************** | ||
57 | # seccomp | ||
58 | #******************************** | ||
59 | echo "TESTING: seccomp umount (test/root/seccomp-umount.exp)" | ||
60 | ./seccomp-umount.exp | ||
61 | |||
62 | echo "TESTING: seccomp chmod (test/root/seccomp-chmod.exp)" | ||
63 | ./seccomp-chmod.exp | ||
64 | |||
65 | echo "TESTING: seccomp chown (test/root/seccomp-chown.exp)" | ||
66 | ./seccomp-chown.exp | ||
67 | |||
68 | #******************************** | ||
69 | # command line options | ||
70 | #******************************** | ||
71 | echo "TESTING: tmpfs (test/root/option_tmpfs.exp)" | ||
72 | ./option_tmpfs.exp | ||
73 | |||
74 | echo "TESTING: profile tmpfs (test/root/profile_tmpfs)" | ||
75 | ./profile_tmpfs.exp | ||
76 | |||
77 | echo "TESTING: bind directory (test/root/option_bind_directory.exp)" | ||
78 | ./option_bind_directory.exp | ||
79 | |||
80 | echo "TESTING: bind file (test/root/option_bind_file.exp)" | ||
81 | echo hello > tmpfile | ||
82 | ./option_bind_file.exp | ||
83 | rm -f tmpfile | ||
84 | |||
85 | #******************************** | ||
86 | # firemon | ||
87 | #******************************** | ||
88 | echo "TESTING: firemon events (test/root/firemon-events.exp)" | ||
89 | ./firemon-events.exp | ||
90 | |||
91 | #******************************** | ||
92 | # firecfg | ||
93 | #******************************** | ||
94 | which firefox | ||
95 | if [ "$?" -eq 0 ]; | ||
96 | then | ||
97 | echo "TESTING: firecfg (test/root/firecfg.exp)" | ||
98 | ./firecfg.exp | ||
99 | else | ||
100 | echo "TESTING SKIP: firecfg, firefox not found" | ||
101 | fi | ||
102 | |||
103 | # restore the default config file | ||
104 | cp ../../etc/firejail.config /etc/firejail/firejail.config | ||
105 | |||