diff options
author | netblue30 <netblue30@yahoo.com> | 2015-11-17 10:41:52 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2015-11-17 10:41:52 -0500 |
commit | c3bd40d2404319cca625ecc521a4514d27e8f76a (patch) | |
tree | e26c188478bd45e28c44f58d33e8f06243410c88 /test/private-whitelist.exp | |
parent | handle ~/.config/user-dirs.dirs (diff) | |
download | firejail-c3bd40d2404319cca625ecc521a4514d27e8f76a.tar.gz firejail-c3bd40d2404319cca625ecc521a4514d27e8f76a.tar.zst firejail-c3bd40d2404319cca625ecc521a4514d27e8f76a.zip |
allow mixing of whitelist and private
Diffstat (limited to 'test/private-whitelist.exp')
-rwxr-xr-x | test/private-whitelist.exp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/private-whitelist.exp b/test/private-whitelist.exp new file mode 100755 index 000000000..b78eb3b61 --- /dev/null +++ b/test/private-whitelist.exp | |||
@@ -0,0 +1,36 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail --private --whitelist=/tmp/.X11-unix\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 1\n";exit} | ||
10 | "Child process initialized" | ||
11 | } | ||
12 | sleep 1 | ||
13 | |||
14 | send -- "ls -al /tmp\r" | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 2\n";exit} | ||
17 | ".X11-unix" | ||
18 | } | ||
19 | sleep 1 | ||
20 | |||
21 | send -- "ls -a /tmp | wc\r" | ||
22 | expect { | ||
23 | timeout {puts "TESTING ERROR 3\n";exit} | ||
24 | "3" | ||
25 | } | ||
26 | sleep 1 | ||
27 | |||
28 | send -- "ls -a ~ | wc\r" | ||
29 | expect { | ||
30 | timeout {puts "TESTING ERROR 4\n";exit} | ||
31 | "4" | ||
32 | } | ||
33 | |||
34 | sleep 1 | ||
35 | puts "\nall done\n" | ||
36 | |||