diff options
author | netblue30 <netblue30@yahoo.com> | 2015-08-28 14:13:15 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2015-08-28 14:13:15 -0400 |
commit | 6576b9ee6d682a3b63b88d1d9de3d8fa872bc7ac (patch) | |
tree | a519cfca55f56166e4fb9e63b86d8f559fbd954f /test/blacklist-link.exp | |
parent | don't blacklist directory links, print a warning (diff) | |
download | firejail-6576b9ee6d682a3b63b88d1d9de3d8fa872bc7ac.tar.gz firejail-6576b9ee6d682a3b63b88d1d9de3d8fa872bc7ac.tar.zst firejail-6576b9ee6d682a3b63b88d1d9de3d8fa872bc7ac.zip |
more fixes for blacklist on Arch systems
Diffstat (limited to 'test/blacklist-link.exp')
-rwxr-xr-x | test/blacklist-link.exp | 55 |
1 files changed, 44 insertions, 11 deletions
diff --git a/test/blacklist-link.exp b/test/blacklist-link.exp index da52cae4a..84fa6c3f5 100755 --- a/test/blacklist-link.exp +++ b/test/blacklist-link.exp | |||
@@ -8,18 +8,14 @@ match_max 100000 | |||
8 | send -- "firejail --blacklist=auto2\r" | 8 | send -- "firejail --blacklist=auto2\r" |
9 | expect { | 9 | expect { |
10 | timeout {puts "TESTING ERROR 1\n";exit} | 10 | timeout {puts "TESTING ERROR 1\n";exit} |
11 | "directory link was not blacklisted" | ||
12 | } | ||
13 | expect { | ||
14 | timeout {puts "TESTING ERROR 1.1\n";exit} | ||
15 | "Child process initialized" | 11 | "Child process initialized" |
16 | } | 12 | } |
17 | sleep 1 | 13 | sleep 1 |
18 | 14 | ||
19 | send -- "file auto2\r" | 15 | send -- "ls auto2\r" |
20 | expect { | 16 | expect { |
21 | timeout {puts "TESTING ERROR 2\n";exit} | 17 | timeout {puts "TESTING ERROR 2\n";exit} |
22 | "symbolic link to" | 18 | "cannot open directory" |
23 | } | 19 | } |
24 | send -- "exit\r" | 20 | send -- "exit\r" |
25 | sleep 1 | 21 | sleep 1 |
@@ -28,22 +24,59 @@ sleep 1 | |||
28 | send -- "firejail --profile=blacklist3.profile\r" | 24 | send -- "firejail --profile=blacklist3.profile\r" |
29 | expect { | 25 | expect { |
30 | timeout {puts "TESTING ERROR 3\n";exit} | 26 | timeout {puts "TESTING ERROR 3\n";exit} |
31 | "directory link was not blacklisted" | 27 | "Child process initialized" |
28 | } | ||
29 | sleep 1 | ||
30 | |||
31 | send -- "ls auto2\r" | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 4\n";exit} | ||
34 | "cannot open directory" | ||
35 | } | ||
36 | send -- "exit\r" | ||
37 | sleep 1 | ||
38 | |||
39 | # do not blacklist /bin | ||
40 | send -- "firejail --blacklist=auto3\r" | ||
41 | expect { | ||
42 | timeout {puts "TESTING ERROR 5\n";exit} | ||
43 | "auto3 directory link was not blacklisted" | ||
32 | } | 44 | } |
33 | expect { | 45 | expect { |
34 | timeout {puts "TESTING ERROR 3.1\n";exit} | 46 | timeout {puts "TESTING ERROR 5.1\n";exit} |
35 | "Child process initialized" | 47 | "Child process initialized" |
36 | } | 48 | } |
37 | sleep 1 | 49 | sleep 1 |
38 | 50 | ||
39 | send -- "file auto2\r" | 51 | send -- "ls auto3; pwd\r" |
40 | expect { | 52 | expect { |
41 | timeout {puts "TESTING ERROR 4\n";exit} | 53 | timeout {puts "TESTING ERROR 6\n";exit} |
42 | "symbolic link to" | 54 | "cannot open directory" {puts "TESTING ERROR 6.1\n";exit} |
55 | "home" | ||
43 | } | 56 | } |
44 | send -- "exit\r" | 57 | send -- "exit\r" |
45 | sleep 1 | 58 | sleep 1 |
46 | 59 | ||
60 | # do not blacklist /usr/bin | ||
61 | send -- "firejail --blacklist=auto3\r" | ||
62 | expect { | ||
63 | timeout {puts "TESTING ERROR 7\n";exit} | ||
64 | "auto3 directory link was not blacklisted" | ||
65 | } | ||
66 | expect { | ||
67 | timeout {puts "TESTING ERROR 7.1\n";exit} | ||
68 | "Child process initialized" | ||
69 | } | ||
70 | sleep 1 | ||
71 | |||
72 | send -- "ls auto3; pwd\r" | ||
73 | expect { | ||
74 | timeout {puts "TESTING ERROR 8\n";exit} | ||
75 | "cannot open directory" {puts "TESTING ERROR 9.1\n";exit} | ||
76 | "home" | ||
77 | } | ||
78 | send -- "exit\r" | ||
79 | sleep 1 | ||
47 | 80 | ||
48 | 81 | ||
49 | puts "all done\n" | 82 | puts "all done\n" |