aboutsummaryrefslogtreecommitdiffstats
path: root/test/root/root.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/root/root.sh')
-rwxr-xr-xtest/root/root.sh114
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
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
56echo "TESTING: fs whitelist mnt, opt, media (test/root/whitelist-mnt.exp)"
57./whitelist.exp
58
59#********************************
60# utils
61#********************************
62echo "TESTING: join (test/root/join.exp)"
63./join.exp
64
65#********************************
66# seccomp
67#********************************
68echo "TESTING: seccomp umount (test/root/seccomp-umount.exp)"
69./seccomp-umount.exp
70
71echo "TESTING: seccomp chmod (test/root/seccomp-chmod.exp)"
72./seccomp-chmod.exp
73
74echo "TESTING: seccomp chown (test/root/seccomp-chown.exp)"
75./seccomp-chown.exp
76
77#********************************
78# command line options
79#********************************
80echo "TESTING: tmpfs (test/root/option_tmpfs.exp)"
81./option_tmpfs.exp
82
83echo "TESTING: profile tmpfs (test/root/profile_tmpfs)"
84./profile_tmpfs.exp
85
86echo "TESTING: bind directory (test/root/option_bind_directory.exp)"
87./option_bind_directory.exp
88
89echo "TESTING: bind file (test/root/option_bind_file.exp)"
90echo hello > tmpfile
91./option_bind_file.exp
92rm -f tmpfile
93
94#********************************
95# firemon
96#********************************
97echo "TESTING: firemon events (test/root/firemon-events.exp)"
98./firemon-events.exp
99
100#********************************
101# firecfg
102#********************************
103which firefox
104if [ "$?" -eq 0 ];
105then
106 echo "TESTING: firecfg (test/root/firecfg.exp)"
107 ./firecfg.exp
108else
109 echo "TESTING SKIP: firecfg, firefox not found"
110fi
111
112# restore the default config file
113cp ../../etc/firejail.config /etc/firejail/firejail.config
114