blob: 0c88e67d1e1776ddc408180e32d55a969a2aa66c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
#!/bin/bash
# This file is part of Firejail project
# Copyright (C) 2014-2020 Firejail Authors
# License GPL v2
# set a new firejail config file
#cp firejail.config /etc/firejail/firejail.config
export LC_ALL=C
#********************************
# firecfg
#********************************
which less 2>/dev/null
if [ "$?" -eq 0 ];
then
echo "TESTING: firecfg (test/root/firecfg.exp)"
mv /home/netblue/.local/share/applications /home/netblue/.local/share/applications-store
./firecfg.exp
mv /home/netblue/.local/share/applications-store /home/netblue/.local/share/applications
else
echo "TESTING SKIP: firecfg, less not found"
fi
#********************************
# servers
#********************************
if [ -f /etc/init.d/snmpd ]
then
echo "TESTING: snmpd (test/root/snmpd.exp)"
./snmpd.exp
else
echo "TESTING SKIP: snmpd not found"
fi
if [ -f /etc/init.d/apache2 ]
then
echo "TESTING: apache2 (test/root/apache2.exp)"
./apache2.exp
else
echo "TESTING SKIP: apache2 not found"
fi
if [ -f /etc/init.d/isc-dhcp-server ]
then
echo "TESTING: isc dhcp server (test/root/isc-dhscp.exp)"
./isc-dhcp.exp
else
echo "TESTING SKIP: isc dhcp server not found"
fi
if [ -f /etc/init.d/unbound ]
then
echo "TESTING: unbound (test/root/unbound.exp)"
./unbound.exp
else
echo "TESTING SKIP: unbound not found"
fi
if [ -f /etc/init.d/nginx ]
then
echo "TESTING: nginx (test/root/nginx.exp)"
./nginx.exp
else
echo "TESTING SKIP: nginx not found"
fi
#********************************
# filesystem
#********************************
echo "TESTING: fs private (test/root/private.exp)"
./private.exp
echo "TESTING: fs whitelist mnt, opt, media (test/root/whitelist-mnt.exp)"
./whitelist.exp
#********************************
# utils
#********************************
echo "TESTING: join (test/root/join.exp)"
./join.exp
echo "TESTING: login-nobody (test/root/login_nobody.exp)"
./login_nobody.exp
#********************************
# seccomp
#********************************
echo "TESTING: seccomp umount (test/root/seccomp-umount.exp)"
./seccomp-umount.exp
echo "TESTING: seccomp chmod (test/root/seccomp-chmod.exp)"
./seccomp-chmod.exp
echo "TESTING: seccomp chown (test/root/seccomp-chown.exp)"
./seccomp-chown.exp
#********************************
# command line options
#********************************
echo "TESTING: firejail configuration (test/root/checkcfg.exp)"
./checkcfg.exp
cp ../../etc/firejail.config /etc/firejail/.
echo "TESTING: cgroup (test/root/cgroup.exp)"
./cgroup.exp
echo "TESTING: tmpfs (test/root/option_tmpfs.exp)"
./option_tmpfs.exp
echo "TESTING: profile tmpfs (test/root/profile_tmpfs)"
./profile_tmpfs.exp
echo "TESTING: bind directory (test/root/option_bind_directory.exp)"
./option_bind_directory.exp
echo "TESTING: bind file (test/root/option_bind_file.exp)"
echo hello > tmpfile
./option_bind_file.exp
rm -f tmpfile
#********************************
# firemon
#********************************
echo "TESTING: firemon events (test/root/firemon-events.exp)"
./firemon-events.exp
# restore the default config file
#cp ../../etc/firejail.config /etc/firejail/firejail.config
|