diff options
author | netblue30 <netblue30@yahoo.com> | 2018-04-12 22:23:23 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2018-04-12 22:23:23 -0400 |
commit | d5b3b13b66f0188fdf61a2fb2dd0d36ac665ab57 (patch) | |
tree | 62f5a4f0835021d1b77c9e321ca6cde471ccd307 /test/filters | |
parent | Merge branch 'master' of http://github.com/netblue30/firejail (diff) | |
download | firejail-d5b3b13b66f0188fdf61a2fb2dd0d36ac665ab57.tar.gz firejail-d5b3b13b66f0188fdf61a2fb2dd0d36ac665ab57.tar.zst firejail-d5b3b13b66f0188fdf61a2fb2dd0d36ac665ab57.zip |
seccomp postexec testing
Diffstat (limited to 'test/filters')
-rwxr-xr-x | test/filters/filters.sh | 3 | ||||
-rwxr-xr-x | test/filters/seccomp-postexec.exp | 33 |
2 files changed, 36 insertions, 0 deletions
diff --git a/test/filters/filters.sh b/test/filters/filters.sh index 12f13606b..97ecc8be0 100755 --- a/test/filters/filters.sh +++ b/test/filters/filters.sh | |||
@@ -31,6 +31,9 @@ echo "TESTING: debug options (test/filters/debug.exp)" | |||
31 | echo "TESTING: seccomp run files (test/filters/seccomp-run-files.exp)" | 31 | echo "TESTING: seccomp run files (test/filters/seccomp-run-files.exp)" |
32 | ./seccomp-run-files.exp | 32 | ./seccomp-run-files.exp |
33 | 33 | ||
34 | echo "TESTING: seccomp postexec (test/filters/seccomp-postexec.exp)" | ||
35 | ./seccomp-postexec.exp | ||
36 | |||
34 | echo "TESTING: noroot (test/filters/noroot.exp)" | 37 | echo "TESTING: noroot (test/filters/noroot.exp)" |
35 | ./noroot.exp | 38 | ./noroot.exp |
36 | 39 | ||
diff --git a/test/filters/seccomp-postexec.exp b/test/filters/seccomp-postexec.exp new file mode 100755 index 000000000..4302aec5e --- /dev/null +++ b/test/filters/seccomp-postexec.exp | |||
@@ -0,0 +1,33 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2018 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --debug --seccomp=execve\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "configuring postexec seccomp filter in" | ||
14 | } | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 1\n";exit} | ||
17 | "data.architecture" | ||
18 | } | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 2\n";exit} | ||
21 | "monitoring pid" | ||
22 | } | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 3\n";exit} | ||
25 | "Sandbox monitor: waitpid" | ||
26 | } | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 4\n";exit} | ||
29 | "Parent is shutting down" | ||
30 | } | ||
31 | sleep 1 | ||
32 | |||
33 | puts "all done\n" | ||