diff options
Diffstat (limited to 'test/blacklist-link.exp')
-rwxr-xr-x | test/blacklist-link.exp | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/test/blacklist-link.exp b/test/blacklist-link.exp deleted file mode 100755 index 4252f875a..000000000 --- a/test/blacklist-link.exp +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | # blacklist a directory symlink | ||
8 | send -- "firejail --blacklist=auto2\r" | ||
9 | expect { | ||
10 | timeout {puts "TESTING ERROR 1\n";exit} | ||
11 | "Child process initialized" | ||
12 | } | ||
13 | sleep 1 | ||
14 | |||
15 | send -- "ls auto2\r" | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 2\n";exit} | ||
18 | "cannot open directory" | ||
19 | } | ||
20 | send -- "exit\r" | ||
21 | sleep 1 | ||
22 | |||
23 | # blacklist a directory symlink from a profile file | ||
24 | send -- "firejail --profile=blacklist3.profile\r" | ||
25 | expect { | ||
26 | timeout {puts "TESTING ERROR 3\n";exit} | ||
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" | ||
44 | } | ||
45 | expect { | ||
46 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
47 | "Child process initialized" | ||
48 | } | ||
49 | sleep 1 | ||
50 | |||
51 | send -- "ls auto3; pwd\r" | ||
52 | expect { | ||
53 | timeout {puts "TESTING ERROR 6\n";exit} | ||
54 | "cannot open directory" {puts "TESTING ERROR 6.1\n";exit} | ||
55 | "home" | ||
56 | } | ||
57 | send -- "exit\r" | ||
58 | sleep 1 | ||
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 | ||
80 | |||
81 | |||
82 | puts "all done\n" | ||