aboutsummaryrefslogtreecommitdiffstats
path: root/test/private_dir.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2015-08-08 19:12:30 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2015-08-08 19:12:30 -0400
commit1379851360349d6617ad32944a25ee5e2bb74fc2 (patch)
treef69b48e90708bfa3c2723d5a27ed3e024c827b43 /test/private_dir.exp
parentdelete files (diff)
downloadfirejail-1379851360349d6617ad32944a25ee5e2bb74fc2.tar.gz
firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.tar.zst
firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.zip
Baseline firejail 0.9.28
Diffstat (limited to 'test/private_dir.exp')
-rwxr-xr-xtest/private_dir.exp53
1 files changed, 53 insertions, 0 deletions
diff --git a/test/private_dir.exp b/test/private_dir.exp
new file mode 100755
index 000000000..95f89362a
--- /dev/null
+++ b/test/private_dir.exp
@@ -0,0 +1,53 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7# testing private
8send -- "firejail --private=./dirprivate\r"
9expect {
10 timeout {puts "TESTING ERROR 0\n";exit}
11 "Child process initialized"
12}
13sleep 1
14
15send -- "ls -al;pwd\r"
16expect {
17 timeout {puts "TESTING ERROR 0.1\n";exit}
18 "bashrc"
19}
20expect {
21 timeout {puts "TESTING ERROR 0.2\n";exit}
22 "home"
23}
24send -- "ls -al;pwd\r"
25expect {
26 timeout {
27 # OpenSUSE doesn't use .Xauthority from user home directory
28 send -- "env | grep XAUTHORITY\r"
29
30 expect {
31 timeout {puts "TESTING ERROR 0.3\n";exit}
32 "/run/lightdm/netblue/xauthority"
33 }
34 }
35 ".Xauthority"
36}
37expect {
38 timeout {puts "TESTING ERROR 0.4\n";exit}
39 [lindex $argv 0]
40}
41
42send -- "ls -al | wc -l;pwd\r"
43expect {
44 timeout {puts "TESTING ERROR 1\n";exit}
45 "5" {puts "normal system\n";}
46 "4" {puts "OpenSUSE\n";}
47}
48expect {
49 timeout {puts "TESTING ERROR 2\n";exit}
50 "home"
51}
52
53puts "\n"