diff options
author | root <root@debian> | 2016-01-25 14:58:27 -0500 |
---|---|---|
committer | root <root@debian> | 2016-01-25 14:58:27 -0500 |
commit | 678cd1495457318dad39178bb646ba1b96332ddb (patch) | |
tree | 45c5396447d0b42d1a6cd224b24c34ca5744c961 /test | |
parent | testing (diff) | |
download | firejail-678cd1495457318dad39178bb646ba1b96332ddb.tar.gz firejail-678cd1495457318dad39178bb646ba1b96332ddb.tar.zst firejail-678cd1495457318dad39178bb646ba1b96332ddb.zip |
--tmpfs allowd only as root user
Diffstat (limited to 'test')
-rwxr-xr-x | test/invalid_filename.exp | 14 | ||||
-rwxr-xr-x | test/option_tmpfs.exp | 22 | ||||
-rwxr-xr-x | test/test-root.sh | 3 | ||||
-rwxr-xr-x | test/test.sh | 3 |
4 files changed, 23 insertions, 19 deletions
diff --git a/test/invalid_filename.exp b/test/invalid_filename.exp index e496e4aaf..26563aa43 100755 --- a/test/invalid_filename.exp +++ b/test/invalid_filename.exp | |||
@@ -200,20 +200,6 @@ expect { | |||
200 | } | 200 | } |
201 | after 100 | 201 | after 100 |
202 | 202 | ||
203 | send -- "firejail --debug-check-filename --tmpfs=\"bla&&bla\"\r" | ||
204 | expect { | ||
205 | timeout {puts "TESTING ERROR 13.1\n";exit} | ||
206 | "Checking filename bla&&bla" | ||
207 | } | ||
208 | expect { | ||
209 | timeout {puts "TESTING ERROR 13.2\n";exit} | ||
210 | "Error:" | ||
211 | } | ||
212 | expect { | ||
213 | timeout {puts "TESTING ERROR 13.3\n";exit} | ||
214 | "is an invalid filename" | ||
215 | } | ||
216 | after 100 | ||
217 | 203 | ||
218 | send -- "firejail --debug-check-filename --whitelist=\"bla&&bla\"\r" | 204 | send -- "firejail --debug-check-filename --whitelist=\"bla&&bla\"\r" |
219 | expect { | 205 | expect { |
diff --git a/test/option_tmpfs.exp b/test/option_tmpfs.exp index 1ff47ab13..6522ef2d3 100755 --- a/test/option_tmpfs.exp +++ b/test/option_tmpfs.exp | |||
@@ -18,9 +18,27 @@ expect { | |||
18 | } | 18 | } |
19 | expect { | 19 | expect { |
20 | timeout {puts "TESTING ERROR 2\n";exit} | 20 | timeout {puts "TESTING ERROR 2\n";exit} |
21 | "home" | 21 | "/root" |
22 | } | 22 | } |
23 | sleep 1 | 23 | sleep 1 |
24 | send -- "exit\r" | ||
25 | sleep 2 | ||
24 | 26 | ||
25 | puts "\n" | 27 | send -- "firejail --debug-check-filename --tmpfs=\"bla&&bla\"\r" |
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 13.1\n";exit} | ||
30 | "Checking filename bla&&bla" | ||
31 | } | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 13.2\n";exit} | ||
34 | "Error:" | ||
35 | } | ||
36 | expect { | ||
37 | timeout {puts "TESTING ERROR 13.3\n";exit} | ||
38 | "is an invalid filename" | ||
39 | } | ||
40 | after 100 | ||
41 | |||
42 | |||
43 | puts "\nalldone\n" | ||
26 | 44 | ||
diff --git a/test/test-root.sh b/test/test-root.sh index ac6b2ef00..66096f33a 100755 --- a/test/test-root.sh +++ b/test/test-root.sh | |||
@@ -2,6 +2,9 @@ | |||
2 | 2 | ||
3 | ./chk_config.exp | 3 | ./chk_config.exp |
4 | 4 | ||
5 | echo "TESTING: tmpfs" | ||
6 | ./option_tmpfs.exp | ||
7 | |||
5 | echo "TESTING: network interfaces" | 8 | echo "TESTING: network interfaces" |
6 | ./net_interface.exp | 9 | ./net_interface.exp |
7 | 10 | ||
diff --git a/test/test.sh b/test/test.sh index 98addc38a..985b43af0 100755 --- a/test/test.sh +++ b/test/test.sh | |||
@@ -110,9 +110,6 @@ echo "TESTING: firejail in firejail - force new sandbox" | |||
110 | echo "TESTING: chroot overlay" | 110 | echo "TESTING: chroot overlay" |
111 | ./option_chroot_overlay.exp | 111 | ./option_chroot_overlay.exp |
112 | 112 | ||
113 | echo "TESTING: tmpfs" | ||
114 | ./option_tmpfs.exp | ||
115 | |||
116 | echo "TESTING: blacklist directory" | 113 | echo "TESTING: blacklist directory" |
117 | ./option_blacklist.exp | 114 | ./option_blacklist.exp |
118 | 115 | ||