diff options
Diffstat (limited to 'test/fs/noblacklist-blacklist-noexec.exp')
-rwxr-xr-x | test/fs/noblacklist-blacklist-noexec.exp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/fs/noblacklist-blacklist-noexec.exp b/test/fs/noblacklist-blacklist-noexec.exp new file mode 100755 index 000000000..5d0581a8c --- /dev/null +++ b/test/fs/noblacklist-blacklist-noexec.exp | |||
@@ -0,0 +1,36 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2019 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | set PWD $env(PWD) | ||
10 | |||
11 | |||
12 | send -- "firejail --noprofile --noblacklist=$PWD --blacklist=$PWD --noexec=$PWD\r" | ||
13 | expect { | ||
14 | timeout {puts "TESTING ERROR 0\n";exit} | ||
15 | "Child process initialized" | ||
16 | } | ||
17 | sleep 1 | ||
18 | |||
19 | send -- "ls $PWD\r" | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 1\n";exit} | ||
22 | "noblacklist-blacklist-noexec.exp" | ||
23 | } | ||
24 | after 100 | ||
25 | |||
26 | send -- "$PWD/noblacklist-blacklist-noexec.exp\r" | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 2\n";exit} | ||
29 | "Permission denied" | ||
30 | } | ||
31 | after 100 | ||
32 | |||
33 | send -- "exit\r" | ||
34 | sleep 1 | ||
35 | |||
36 | puts "\nall done\n" | ||