aboutsummaryrefslogtreecommitdiffstats
path: root/test/blacklist-link.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2015-08-28 12:38:03 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2015-08-28 12:38:03 -0400
commit7e30149e2e1d31c764673273a7e27cb38f67687d (patch)
tree3a87c36a8b1287c8454494e9279b057decf113ef /test/blacklist-link.exp
parentfix firejail-in-firejail again (diff)
downloadfirejail-7e30149e2e1d31c764673273a7e27cb38f67687d.tar.gz
firejail-7e30149e2e1d31c764673273a7e27cb38f67687d.tar.zst
firejail-7e30149e2e1d31c764673273a7e27cb38f67687d.zip
don't blacklist directory links, print a warning
Diffstat (limited to 'test/blacklist-link.exp')
-rwxr-xr-xtest/blacklist-link.exp50
1 files changed, 50 insertions, 0 deletions
diff --git a/test/blacklist-link.exp b/test/blacklist-link.exp
new file mode 100755
index 000000000..da52cae4a
--- /dev/null
+++ b/test/blacklist-link.exp
@@ -0,0 +1,50 @@
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 "directory link was not blacklisted"
12}
13expect {
14 timeout {puts "TESTING ERROR 1.1\n";exit}
15 "Child process initialized"
16}
17sleep 1
18
19send -- "file auto2\r"
20expect {
21 timeout {puts "TESTING ERROR 2\n";exit}
22 "symbolic link to"
23}
24send -- "exit\r"
25sleep 1
26
27# blacklist a directory symlink from a profile file
28send -- "firejail --profile=blacklist3.profile\r"
29expect {
30 timeout {puts "TESTING ERROR 3\n";exit}
31 "directory link was not blacklisted"
32}
33expect {
34 timeout {puts "TESTING ERROR 3.1\n";exit}
35 "Child process initialized"
36}
37sleep 1
38
39send -- "file auto2\r"
40expect {
41 timeout {puts "TESTING ERROR 4\n";exit}
42 "symbolic link to"
43}
44send -- "exit\r"
45sleep 1
46
47
48
49puts "all done\n"
50