aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-06-01 11:40:24 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-06-01 11:40:24 -0400
commit0c47e3585f3e4a2f365ad83c81f9095712fc34f3 (patch)
tree2f629f371d3679b8337effafcd88de798c76f42d /test
parentmerged Various #542 pull request from Fred-Barclay (diff)
downloadfirejail-0c47e3585f3e4a2f365ad83c81f9095712fc34f3.tar.gz
firejail-0c47e3585f3e4a2f365ad83c81f9095712fc34f3.tar.zst
firejail-0c47e3585f3e4a2f365ad83c81f9095712fc34f3.zip
fixed globbing dot files
Diffstat (limited to 'test')
-rwxr-xr-xtest/fs/fs.sh3
-rwxr-xr-xtest/fs/option_blacklist_glob.exp32
-rw-r--r--test/fs/testdir1/.directory/file0
-rw-r--r--test/fs/testdir1/.file0
4 files changed, 35 insertions, 0 deletions
diff --git a/test/fs/fs.sh b/test/fs/fs.sh
index b49aadf02..08888020c 100755
--- a/test/fs/fs.sh
+++ b/test/fs/fs.sh
@@ -45,6 +45,9 @@ echo "TESTING: blacklist directory (test/fs/option_blacklist.exp)"
45echo "TESTING: blacklist file (test/fs/option_blacklist_file.exp)" 45echo "TESTING: blacklist file (test/fs/option_blacklist_file.exp)"
46./option_blacklist_file.exp 46./option_blacklist_file.exp
47 47
48echo "TESTING: blacklist glob (test/fs/option_blacklist_glob.exp)"
49./option_blacklist_glob.exp
50
48echo "TESTING: bind as user (test/fs/option_bind_user.exp)" 51echo "TESTING: bind as user (test/fs/option_bind_user.exp)"
49./option_bind_user.exp 52./option_bind_user.exp
50 53
diff --git a/test/fs/option_blacklist_glob.exp b/test/fs/option_blacklist_glob.exp
new file mode 100755
index 000000000..01939736d
--- /dev/null
+++ b/test/fs/option_blacklist_glob.exp
@@ -0,0 +1,32 @@
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 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --blacklist=testdir1/*\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized"
14}
15sleep 1
16send -- "cd testdir1\r"
17sleep 1
18
19send -- "cat .file\r"
20expect {
21 timeout {puts "TESTING ERROR 1\n";exit}
22 "Permission denied"
23}
24
25send -- "ls .directory\r"
26expect {
27 timeout {puts "TESTING ERROR 2\n";exit}
28 "Permission denied"
29}
30
31puts "\n"
32
diff --git a/test/fs/testdir1/.directory/file b/test/fs/testdir1/.directory/file
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/test/fs/testdir1/.directory/file
diff --git a/test/fs/testdir1/.file b/test/fs/testdir1/.file
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/test/fs/testdir1/.file