aboutsummaryrefslogtreecommitdiffstats
path: root/test/root/root.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/root/root.sh')
-rwxr-xr-xtest/root/root.sh105
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
4cp firejail.config /etc/firejail/firejail.config
5
6#********************************
7# servers
8#********************************
9if [ -f /etc/init.d/snmpd ]
10then
11 echo "TESTING: snmpd (test/root/snmpd.exp)"
12 ./snmpd.exp
13else
14 echo "TESTING SKIP: snmpd not found"
15fi
16
17
18if [ -f /etc/init.d/apache2 ]
19then
20 echo "TESTING: apache2 (test/root/apache2.exp)"
21 ./apache2.exp
22else
23 echo "TESTING SKIP: apache2 not found"
24fi
25
26if [ -f /etc/init.d/isc-dhcp-server ]
27then
28 echo "TESTING: isc dhcp server (test/root/isc-dhscp.exp)"
29 ./isc-dhcp.exp
30else
31 echo "TESTING SKIP: isc dhcp server not found"
32fi
33
34if [ -f /etc/init.d/unbound ]
35then
36 echo "TESTING: unbound (test/root/unbound.exp)"
37 ./unbound.exp
38else
39 echo "TESTING SKIP: unbound not found"
40fi
41
42if [ -f /etc/init.d/nginx ]
43then
44 echo "TESTING: nginx (test/root/nginx.exp)"
45 ./nginx.exp
46else
47 echo "TESTING SKIP: nginx not found"
48fi
49
50#********************************
51# filesystem
52#********************************
53echo "TESTING: fs private (test/root/private.exp)"
54./private.exp
55
56#********************************
57# seccomp
58#********************************
59echo "TESTING: seccomp umount (test/root/seccomp-umount.exp)"
60./seccomp-umount.exp
61
62echo "TESTING: seccomp chmod (test/root/seccomp-chmod.exp)"
63./seccomp-chmod.exp
64
65echo "TESTING: seccomp chown (test/root/seccomp-chown.exp)"
66./seccomp-chown.exp
67
68#********************************
69# command line options
70#********************************
71echo "TESTING: tmpfs (test/root/option_tmpfs.exp)"
72./option_tmpfs.exp
73
74echo "TESTING: profile tmpfs (test/root/profile_tmpfs)"
75./profile_tmpfs.exp
76
77echo "TESTING: bind directory (test/root/option_bind_directory.exp)"
78./option_bind_directory.exp
79
80echo "TESTING: bind file (test/root/option_bind_file.exp)"
81echo hello > tmpfile
82./option_bind_file.exp
83rm -f tmpfile
84
85#********************************
86# firemon
87#********************************
88echo "TESTING: firemon events (test/root/firemon-events.exp)"
89./firemon-events.exp
90
91#********************************
92# firecfg
93#********************************
94which firefox
95if [ "$?" -eq 0 ];
96then
97 echo "TESTING: firecfg (test/root/firecfg.exp)"
98 ./firecfg.exp
99else
100 echo "TESTING SKIP: firecfg, firefox not found"
101fi
102
103# restore the default config file
104cp ../../etc/firejail.config /etc/firejail/firejail.config
105