diff options
author | curiosity-seeker <seeker@posteo.org> | 2016-12-15 12:58:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-15 12:58:32 +0100 |
commit | d8ee390a6ca56fde4baad57dea7572c39d595809 (patch) | |
tree | 255252b15232086e6f65203cda676859ab4117a0 /test/filters/seccomp-su.exp | |
parent | Update quiterss.profile (diff) | |
parent | added a 1 second delay after xpra server is started (diff) | |
download | firejail-d8ee390a6ca56fde4baad57dea7572c39d595809.tar.gz firejail-d8ee390a6ca56fde4baad57dea7572c39d595809.tar.zst firejail-d8ee390a6ca56fde4baad57dea7572c39d595809.zip |
Merge pull request #1 from netblue30/master
Bring fork up-to-date
Diffstat (limited to 'test/filters/seccomp-su.exp')
-rwxr-xr-x | test/filters/seccomp-su.exp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/filters/seccomp-su.exp b/test/filters/seccomp-su.exp new file mode 100755 index 000000000..3feabc20f --- /dev/null +++ b/test/filters/seccomp-su.exp | |||
@@ -0,0 +1,40 @@ | |||
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 | send -- "firejail --noprofile --seccomp\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "Child process initialized" | ||
14 | } | ||
15 | sleep 2 | ||
16 | |||
17 | send -- "sudo su -\r" | ||
18 | expect { | ||
19 | timeout {puts "TESTING ERROR 1\n";exit} | ||
20 | "effective uid is not 0" {puts "OK\n"} | ||
21 | "Bad system call" {puts "OK\n"} | ||
22 | } | ||
23 | |||
24 | send -- "sudo ls\r" | ||
25 | expect { | ||
26 | timeout {puts "TESTING ERROR 2\n";exit} | ||
27 | "effective uid is not 0" {puts "OK\n"} | ||
28 | "Bad system call" {puts "OK\n"} | ||
29 | } | ||
30 | |||
31 | send -- "ping google.com\r" | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 3\n";exit} | ||
34 | "Operation not permitted" {puts "OK\n"} | ||
35 | "unknown host" {puts "OK\n"} | ||
36 | } | ||
37 | |||
38 | send -- "exit\r" | ||
39 | after 100 | ||
40 | puts "all done\n" | ||