diff options
author | netblue30 <netblue30@yahoo.com> | 2015-08-08 19:12:30 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2015-08-08 19:12:30 -0400 |
commit | 1379851360349d6617ad32944a25ee5e2bb74fc2 (patch) | |
tree | f69b48e90708bfa3c2723d5a27ed3e024c827b43 /test/private_dir_profile.exp | |
parent | delete files (diff) | |
download | firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.tar.gz firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.tar.zst firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.zip |
Baseline firejail 0.9.28
Diffstat (limited to 'test/private_dir_profile.exp')
-rwxr-xr-x | test/private_dir_profile.exp | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/test/private_dir_profile.exp b/test/private_dir_profile.exp new file mode 100755 index 000000000..e6c01798e --- /dev/null +++ b/test/private_dir_profile.exp | |||
@@ -0,0 +1,54 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | # testing private | ||
8 | send -- "firejail --profile=private.profile\r" | ||
9 | expect { | ||
10 | timeout {puts "TESTING ERROR 0\n";exit} | ||
11 | "Child process initialized" | ||
12 | } | ||
13 | sleep 1 | ||
14 | |||
15 | send -- "ls -al;pwd\r" | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 0.1\n";exit} | ||
18 | "bashrc" | ||
19 | } | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 0.2\n";exit} | ||
22 | "home" | ||
23 | } | ||
24 | send -- "ls -al;pwd\r" | ||
25 | expect { | ||
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 | } | ||
37 | expect { | ||
38 | timeout {puts "TESTING ERROR 0.4\n";exit} | ||
39 | [lindex $argv 0] | ||
40 | } | ||
41 | |||
42 | send -- "ls -al | wc -l;pwd\r" | ||
43 | expect { | ||
44 | timeout {puts "TESTING ERROR 1\n";exit} | ||
45 | "5" {puts "normal system\n";} | ||
46 | "4" {puts "OpenSUSE\n";} | ||
47 | } | ||
48 | expect { | ||
49 | timeout {puts "TESTING ERROR 2\n";exit} | ||
50 | "home" | ||
51 | } | ||
52 | |||
53 | puts "\n" | ||
54 | |||