aboutsummaryrefslogtreecommitdiffstats
path: root/test/fs
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-08-05 08:39:56 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-08-05 08:39:56 -0400
commit265cd772fc7852d2deaacd886a26253006235d59 (patch)
tree1bb5a995aadc17bfc0de49e846c67913472c5ac7 /test/fs
parentapparmor fix (diff)
downloadfirejail-265cd772fc7852d2deaacd886a26253006235d59.tar.gz
firejail-265cd772fc7852d2deaacd886a26253006235d59.tar.zst
firejail-265cd772fc7852d2deaacd886a26253006235d59.zip
fix whitelist ~/deletme problem
Diffstat (limited to 'test/fs')
-rwxr-xr-xtest/fs/fs.sh2
-rwxr-xr-xtest/fs/whitelist-double.exp42
2 files changed, 44 insertions, 0 deletions
diff --git a/test/fs/fs.sh b/test/fs/fs.sh
index 00e6e29c2..ee6351e2e 100755
--- a/test/fs/fs.sh
+++ b/test/fs/fs.sh
@@ -54,3 +54,5 @@ echo "TESTING: bind as user (test/fs/option_bind_user.exp)"
54echo "TESTING: recursive mkdir (test/fs/mkdir.exp)" 54echo "TESTING: recursive mkdir (test/fs/mkdir.exp)"
55./mkdir.exp 55./mkdir.exp
56 56
57echo "TESTING: double whitelist (test/fs/whitelist-double.exp)"
58./whitelist-double.exp
diff --git a/test/fs/whitelist-double.exp b/test/fs/whitelist-double.exp
new file mode 100755
index 000000000..87d6ed686
--- /dev/null
+++ b/test/fs/whitelist-double.exp
@@ -0,0 +1,42 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 30
7spawn $env(SHELL)
8match_max 100000
9
10send -- "echo 123 > /tmp/firejal-deleteme\r"
11sleep 1
12
13send -- "firejail --whitelist=/tmp/firejal-deleteme --whitelist=/tmp/firejal-deleteme\r"
14expect {
15 timeout {puts "TESTING ERROR 0\n";exit}
16 "Child process initialized"
17}
18sleep 1
19
20send -- "cat /tmp/firejal-deleteme\r"
21expect {
22 timeout {puts "TESTING ERROR 1\n";exit}
23 "123"
24}
25
26send -- "exit\r"
27sleep 1
28
29send -- "cat /tmp/firejal-deleteme\r"
30expect {
31 timeout {puts "TESTING ERROR 1\n";exit}
32 "123"
33}
34
35send -- "rm/tmp/firejal-deleteme \r"
36expect {
37 timeout {puts "TESTING ERROR 3\n";exit}
38 "0"
39}
40sleep 1
41
42puts "\nall done\n"