summaryrefslogtreecommitdiffstats
path: root/test/fs/private-home-dir.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-12-19 10:24:25 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-12-19 10:24:25 -0500
commit759dc6ade2bcb7408dbbf3dc31230fc7534ca29d (patch)
treedd7cf13f3002fd1c247e25ff53faa70240bc263c /test/fs/private-home-dir.exp
parentMerge pull request #988 from KOLANICH/symlink_fix (diff)
downloadfirejail-759dc6ade2bcb7408dbbf3dc31230fc7534ca29d.tar.gz
firejail-759dc6ade2bcb7408dbbf3dc31230fc7534ca29d.tar.zst
firejail-759dc6ade2bcb7408dbbf3dc31230fc7534ca29d.zip
testing
Diffstat (limited to 'test/fs/private-home-dir.exp')
-rwxr-xr-xtest/fs/private-home-dir.exp62
1 files changed, 61 insertions, 1 deletions
diff --git a/test/fs/private-home-dir.exp b/test/fs/private-home-dir.exp
index 5491be834..f85a939b1 100755
--- a/test/fs/private-home-dir.exp
+++ b/test/fs/private-home-dir.exp
@@ -21,6 +21,8 @@ if {[file exists ~/.Xauthority]} {
21 send -- "touch ~/.Xauthority\r" 21 send -- "touch ~/.Xauthority\r"
22} 22}
23after 100 23after 100
24send -- "rm -fr ~/_firejail_test_dir_\r"
25after 100
24send -- "mkdir ~/_firejail_test_dir_\r" 26send -- "mkdir ~/_firejail_test_dir_\r"
25sleep 1 27sleep 1
26 28
@@ -65,6 +67,64 @@ expect {
65 "private directory should be owned by the current user" 67 "private directory should be owned by the current user"
66} 68}
67sleep 1 69sleep 1
70send -- "mkdir ~/_firejail_test_dir_/test_dir_2\r"
71after 100
72send -- "touch ~/_firejail_test_dir_/test_dir_2/testfile\r"
73sleep 1
68 74
75send -- "firejail --debug --noprofile --blacklist=~/test_dir_2 --private=~/_firejail_test_dir_\r"
76expect {
77 timeout {puts "TESTING ERROR 6\n";exit}
78 "Not blacklist"
79}
80expect {
81 timeout {puts "TESTING ERROR 7\n";exit}
82 "test_dir_2"
83}
84expect {
85 timeout {puts "TESTING ERROR 8\n";exit}
86 "Child process initialized"
87}
88
89sleep 1
90
91send -- "find ~\r"
92expect {
93 timeout {puts "TESTING ERROR 9\n";exit}
94 "testfile"
95}
96after 100
97
98send -- "exit\r"
99sleep 1
100
101send -- "firejail --debug --noprofile --allow-private-blacklist --blacklist=~/test_dir_2 --private=~/_firejail_test_dir_\r"
102expect {
103 timeout {puts "TESTING ERROR 10\n";exit}
104 "Disable"
105}
106expect {
107 timeout {puts "TESTING ERROR 11\n";exit}
108 "test_dir_2"
109}
110expect {
111 timeout {puts "TESTING ERROR 12\n";exit}
112 "Child process initialized"
113}
114
115sleep 1
116
117send -- "ls ~/test_dir_2\r"
118expect {
119 timeout {puts "TESTING ERROR 13\n";exit}
120 "cannot open directory"
121}
122after 100
123
124send "exit\r"
125sleep 1
126
127send -- "rm -fr ~/_firejail_test_dir_\r"
128after 100
69 129
70puts "all done\n" 130puts "\nall done\n"