aboutsummaryrefslogtreecommitdiffstats
path: root/test/fs/private-etc.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/fs/private-etc.exp')
-rwxr-xr-xtest/fs/private-etc.exp34
1 files changed, 31 insertions, 3 deletions
diff --git a/test/fs/private-etc.exp b/test/fs/private-etc.exp
index e692f7382..36b5d247c 100755
--- a/test/fs/private-etc.exp
+++ b/test/fs/private-etc.exp
@@ -33,12 +33,40 @@ expect {
33 "resolv.conf" 33 "resolv.conf"
34} 34}
35 35
36send -- "ls -al /etc; echo done\r" 36
37send -- "file /etc/shadow\r"
37expect { 38expect {
38 timeout {puts "TESTING ERROR 7\n";exit} 39 timeout {puts "TESTING ERROR 7\n";exit}
39 "shadow" {puts "TESTING ERROR 8\n";exit} 40 "No such file or directory"
40 "done" 41}
42after 100
43send -- "exit\r"
44sleep 1
45
46send -- "firejail --private-etc=shadow\r"
47expect {
48 timeout {puts "TESTING ERROR 8\n";exit}
49 "invalid file type"
50}
51after 100
52
53send -- "firejail --private-etc=\"bla;bla\"\r"
54expect {
55 timeout {puts "TESTING ERROR 9\n";exit}
56 "is an invalid filename"
41} 57}
58after 100
59
60send -- "firejail --private-etc=../bin/ls\r"
61expect {
62 timeout {puts "TESTING ERROR 10\n";exit}
63 "is an invalid filename"
64}
65after 100
66
67
68
69
42 70
43after 100 71after 100
44puts "\nall done\n" 72puts "\nall done\n"