aboutsummaryrefslogtreecommitdiffstats
path: root/test/root/checkcfg.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/root/checkcfg.exp')
-rwxr-xr-xtest/root/checkcfg.exp164
1 files changed, 0 insertions, 164 deletions
diff --git a/test/root/checkcfg.exp b/test/root/checkcfg.exp
deleted file mode 100755
index d7aea8084..000000000
--- a/test/root/checkcfg.exp
+++ /dev/null
@@ -1,164 +0,0 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2023 Firejail Authors
4# License GPL v2
5
6set timeout 10
7cd /home
8spawn $env(SHELL)
9match_max 100000
10
11send -- "rm /etc/firejail/firejail.config\r"
12after 100
13
14send -- "firejail\r"
15expect {
16 timeout {puts "TESTING ERROR 1\n";exit}
17 "firejail.config not found"
18}
19
20# seccomp
21send -- "echo \"seccomp no\" > /etc/firejail/firejail.config\r"
22after 100
23send -- "firejail --noprofile --seccomp\r"
24expect {
25 timeout {puts "TESTING ERROR 2\n";exit}
26 "seccomp feature is disabled in Firejail configuration file\r"
27}
28
29# whitelist
30send -- "echo \"whitelist no\" > /etc/firejail/firejail.config\r"
31after 100
32send -- "firejail --noprofile --whitelist=~/.config\r"
33expect {
34 timeout {puts "TESTING ERROR 3\n";exit}
35 "whitelist feature is disabled in Firejail configuration file\r"
36}
37
38# network
39send -- "echo \"network no\" > /etc/firejail/firejail.config\r"
40after 100
41send -- "firejail --noprofile --net=eth0\r"
42expect {
43 timeout {puts "TESTING ERROR 4\n";exit}
44 "networking feature is disabled in Firejail configuration file\r"
45}
46
47# bind
48send -- "echo \"bind no\" > /etc/firejail/firejail.config\r"
49after 100
50send -- "firejail --noprofile --bind=/tmp,/var/tmp\r"
51expect {
52 timeout {puts "TESTING ERROR 5\n";exit}
53 "bind feature is disabled in Firejail configuration file\r"
54}
55
56# overlay
57send -- "echo \"overlayfs no\" > /etc/firejail/firejail.config\r"
58after 100
59send -- "firejail --noprofile --overlay\r"
60expect {
61 timeout {puts "TESTING ERROR 6\n";exit}
62 "overlayfs feature is disabled in Firejail configuration file\r"
63}
64
65# private-home
66send -- "echo \"private-home no\" > /etc/firejail/firejail.config\r"
67after 100
68send -- "firejail --noprofile --private-home=/tmp\r"
69expect {
70 timeout {puts "TESTING ERROR 7\n";exit}
71 "private-home feature is disabled in Firejail configuration file\r"
72}
73
74# chroot
75send -- "echo \"chroot no\" > /etc/firejail/firejail.config\r"
76after 100
77send -- "firejail --noprofile --chroot=/tmp\r"
78expect {
79 timeout {puts "TESTING ERROR 8\n";exit}
80 "chroot feature is disabled in Firejail configuration file\r"
81}
82
83# userns
84send -- "echo \"userns no\" > /etc/firejail/firejail.config\r"
85after 100
86send -- "firejail --noprofile --noroot\r"
87expect {
88 timeout {puts "TESTING ERROR 9\n";exit}
89 "noroot feature is disabled in Firejail configuration file\r"
90}
91sleep 1
92
93# netfilter-default
94send -- "echo \"netfilter-default blablabla\" > /etc/firejail/firejail.config\r"
95after 100
96send -- "firejail --noprofile\r"
97expect {
98 timeout {puts "TESTING ERROR 10\n";exit}
99 "netfilter-default file blablabla not available\r"
100}
101after 100
102
103# strings
104send -- "echo \"xephyr-screen 800x600\" > /etc/firejail/firejail.config\r"
105after 100
106send -- "echo \"xvfb-screen 800x600x24\" >> /etc/firejail/firejail.config\r"
107after 100
108send -- "echo \"xvfb-extra-params blablabla\" >> /etc/firejail/firejail.config\r"
109sleep 1
110send -- "stty -echo\r"
111after 100
112send -- "firejail --noprofile echo done\r"
113expect {
114 timeout {puts "TESTING ERROR 11\n";exit}
115 "done\r"
116}
117sleep 1
118
119after 100
120send -- "echo \"join no\" > /etc/firejail/firejail.config\r"
121after 100
122send -- "echo \"cache-tmpfs no\" >> /etc/firejail/firejail.config\r"
123after 100
124send -- "echo \"file-transfer no\" >> /etc/firejail/firejail.config\r"
125after 100
126send -- "echo \"x11 no\" >> /etc/firejail/firejail.config\r"
127after 100
128send -- "echo \"firejail-prompt yes\" >> /etc/firejail/firejail.config\r"
129after 100
130send -- "echo \"follow-symlink-as-user yes\" >> /etc/firejail/firejail.config\r"
131after 100
132send -- "echo \"follow-symlink-private-bin yes\" >> /etc/firejail/firejail.config\r"
133after 100
134send -- "echo \"force-nonewprivs yes\" >> /etc/firejail/firejail.config\r"
135after 100
136send -- "echo \"seccomp no\" >> /etc/firejail/firejail.config\r"
137after 100
138send -- "echo \"restricted-network yes\" >> /etc/firejail/firejail.config\r"
139after 100
140send -- "echo \"xephyr-window-title yes\" >> /etc/firejail/firejail.config\r"
141after 100
142send -- "echo \"quiet-by-default yes\" >> /etc/firejail/firejail.config\r"
143after 100
144send -- "echo \"chroot-desktop no\" >> /etc/firejail/firejail.config\r"
145after 100
146send -- "echo \"private-bin-no-local yes\" >> /etc/firejail/firejail.config\r"
147after 100
148send -- "echo \"disable-mnt yes\" >> /etc/firejail/firejail.config\r"
149after 100
150send -- "echo \"xephyr-window-title no\" >> /etc/firejail/firejail.config\r"
151after 100
152send -- "echo \"remount-proc-sys no\" >> /etc/firejail/firejail.config\r"
153after 100
154send -- "echo \"disable-mnt no\" >> /etc/firejail/firejail.config\r"
155after 100
156send -- "echo \"blablabla\" >> /etc/firejail/firejail.config\r"
157after 100
158send -- "firejail --noprofile\r"
159expect {
160 timeout {puts "TESTING ERROR 12\n";exit}
161 ""
162}
163after 100
164puts "\nall done\n"