diff options
author | netblue30 <netblue30@yahoo.com> | 2016-05-05 10:22:18 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-05-05 10:22:18 -0400 |
commit | 37a5a3545ef6d8d03dad8bbd888f53e13274c9e5 (patch) | |
tree | 5d56a4b0a0933963d97eb0a88dd00fec9ea58bf2 /test/fs/private-etc.exp | |
parent | rename generic.profile as default.profile (diff) | |
download | firejail-37a5a3545ef6d8d03dad8bbd888f53e13274c9e5.tar.gz firejail-37a5a3545ef6d8d03dad8bbd888f53e13274c9e5.tar.zst firejail-37a5a3545ef6d8d03dad8bbd888f53e13274c9e5.zip |
testing
Diffstat (limited to 'test/fs/private-etc.exp')
-rwxr-xr-x | test/fs/private-etc.exp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/test/fs/private-etc.exp b/test/fs/private-etc.exp new file mode 100755 index 000000000..e5a006585 --- /dev/null +++ b/test/fs/private-etc.exp | |||
@@ -0,0 +1,45 @@ | |||
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 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | # directory with ~ | ||
11 | send -- "firejail --private-etc=passwd,group,resolv.conf,X11\r" | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 1\n";exit} | ||
14 | "Child process initialized" | ||
15 | } | ||
16 | sleep 1 | ||
17 | |||
18 | send -- "ls -al /etc\r" | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 3\n";exit} | ||
21 | "group" | ||
22 | } | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 4\n";exit} | ||
25 | "passwd" | ||
26 | } | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 5\n";exit} | ||
29 | "resolv.conf" | ||
30 | } | ||
31 | expect { | ||
32 | timeout {puts "TESTING ERROR 6\n";exit} | ||
33 | "X11" | ||
34 | } | ||
35 | |||
36 | send -- "ls -al /etc\r" | ||
37 | expect { | ||
38 | timeout {puts "TESTING ERROR 7\n";exit} | ||
39 | "shadow" {puts "TESTING ERROR 8\n";exit} | ||
40 | "X11" | ||
41 | } | ||
42 | |||
43 | sleep 1 | ||
44 | puts "\nall done\n" | ||
45 | |||