diff options
author | netblue30 <netblue30@yahoo.com> | 2016-11-18 09:11:30 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-11-18 09:11:30 -0500 |
commit | 8c2b460d143d8dda4a86b826c0920918aa15f1f7 (patch) | |
tree | eae4c3a6f4805f0940e487299ccad8804665c843 /test/fs/private-etc.exp | |
parent | testing appimage (diff) | |
download | firejail-8c2b460d143d8dda4a86b826c0920918aa15f1f7.tar.gz firejail-8c2b460d143d8dda4a86b826c0920918aa15f1f7.tar.zst firejail-8c2b460d143d8dda4a86b826c0920918aa15f1f7.zip |
fcopy part 4
Diffstat (limited to 'test/fs/private-etc.exp')
-rwxr-xr-x | test/fs/private-etc.exp | 34 |
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 | ||
36 | send -- "ls -al /etc; echo done\r" | 36 | |
37 | send -- "file /etc/shadow\r" | ||
37 | expect { | 38 | expect { |
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 | } |
42 | after 100 | ||
43 | send -- "exit\r" | ||
44 | sleep 1 | ||
45 | |||
46 | send -- "firejail --private-etc=shadow\r" | ||
47 | expect { | ||
48 | timeout {puts "TESTING ERROR 8\n";exit} | ||
49 | "invalid file type" | ||
50 | } | ||
51 | after 100 | ||
52 | |||
53 | send -- "firejail --private-etc=\"bla;bla\"\r" | ||
54 | expect { | ||
55 | timeout {puts "TESTING ERROR 9\n";exit} | ||
56 | "is an invalid filename" | ||
41 | } | 57 | } |
58 | after 100 | ||
59 | |||
60 | send -- "firejail --private-etc=../bin/ls\r" | ||
61 | expect { | ||
62 | timeout {puts "TESTING ERROR 10\n";exit} | ||
63 | "is an invalid filename" | ||
64 | } | ||
65 | after 100 | ||
66 | |||
67 | |||
68 | |||
69 | |||
42 | 70 | ||
43 | after 100 | 71 | after 100 |
44 | puts "\nall done\n" | 72 | puts "\nall done\n" |