diff options
author | netblue30 <netblue30@yahoo.com> | 2015-08-20 09:06:07 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2015-08-20 09:06:07 -0400 |
commit | cb585cc82af4318a888470a7da82cc89dd01774d (patch) | |
tree | ac68cbaa7f0464f097135984e55f2b2596497e8a /test/private-etc.exp | |
parent | Merge pull request #34 from pmillerchip/make-install (diff) | |
download | firejail-cb585cc82af4318a888470a7da82cc89dd01774d.tar.gz firejail-cb585cc82af4318a888470a7da82cc89dd01774d.tar.zst firejail-cb585cc82af4318a888470a7da82cc89dd01774d.zip |
testing
Diffstat (limited to 'test/private-etc.exp')
-rwxr-xr-x | test/private-etc.exp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/test/private-etc.exp b/test/private-etc.exp new file mode 100755 index 000000000..9df798e22 --- /dev/null +++ b/test/private-etc.exp | |||
@@ -0,0 +1,46 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | # directory with ~ | ||
8 | send -- "firejail --private-etc=passwd,group,resolv.conf,bash_completion.d,timezone\r" | ||
9 | expect { | ||
10 | timeout {puts "TESTING ERROR 1\n";exit} | ||
11 | "Child process initialized" | ||
12 | } | ||
13 | sleep 1 | ||
14 | |||
15 | send -- "ls -al /etc\r" | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 2\n";exit} | ||
18 | "bash_completion.d" | ||
19 | } | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 3\n";exit} | ||
22 | "group" | ||
23 | } | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 4\n";exit} | ||
26 | "passwd" | ||
27 | } | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 5\n";exit} | ||
30 | "resolv.conf" | ||
31 | } | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 6\n";exit} | ||
34 | "timezone" | ||
35 | } | ||
36 | |||
37 | send -- "ls -al /etc\r" | ||
38 | expect { | ||
39 | timeout {puts "TESTING ERROR 7\n";exit} | ||
40 | "shadow" {puts "TESTING ERROR 8\n";exit} | ||
41 | "timezone" | ||
42 | } | ||
43 | |||
44 | sleep 1 | ||
45 | puts "\n" | ||
46 | |||