aboutsummaryrefslogtreecommitdiffstats
path: root/test/blacklist-link.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/blacklist-link.exp')
-rwxr-xr-xtest/blacklist-link.exp82
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
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7# blacklist a directory symlink
8send -- "firejail --blacklist=auto2\r"
9expect {
10 timeout {puts "TESTING ERROR 1\n";exit}
11 "Child process initialized"
12}
13sleep 1
14
15send -- "ls auto2\r"
16expect {
17 timeout {puts "TESTING ERROR 2\n";exit}
18 "cannot open directory"
19}
20send -- "exit\r"
21sleep 1
22
23# blacklist a directory symlink from a profile file
24send -- "firejail --profile=blacklist3.profile\r"
25expect {
26 timeout {puts "TESTING ERROR 3\n";exit}
27 "Child process initialized"
28}
29sleep 1
30
31send -- "ls auto2\r"
32expect {
33 timeout {puts "TESTING ERROR 4\n";exit}
34 "cannot open directory"
35}
36send -- "exit\r"
37sleep 1
38
39# do not blacklist /bin
40send -- "firejail --blacklist=auto3\r"
41expect {
42 timeout {puts "TESTING ERROR 5\n";exit}
43 "auto3 directory link was not blacklisted"
44}
45expect {
46 timeout {puts "TESTING ERROR 5.1\n";exit}
47 "Child process initialized"
48}
49sleep 1
50
51send -- "ls auto3; pwd\r"
52expect {
53 timeout {puts "TESTING ERROR 6\n";exit}
54 "cannot open directory" {puts "TESTING ERROR 6.1\n";exit}
55 "home"
56}
57send -- "exit\r"
58sleep 1
59
60# do not blacklist /usr/bin
61send -- "firejail --blacklist=auto3\r"
62expect {
63 timeout {puts "TESTING ERROR 7\n";exit}
64 "auto3 directory link was not blacklisted"
65}
66expect {
67 timeout {puts "TESTING ERROR 7.1\n";exit}
68 "Child process initialized"
69}
70sleep 1
71
72send -- "ls auto3; pwd\r"
73expect {
74 timeout {puts "TESTING ERROR 8\n";exit}
75 "cannot open directory" {puts "TESTING ERROR 9.1\n";exit}
76 "home"
77}
78send -- "exit\r"
79sleep 1
80
81
82puts "all done\n"