From d5b3b13b66f0188fdf61a2fb2dd0d36ac665ab57 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Thu, 12 Apr 2018 22:23:23 -0400 Subject: seccomp postexec testing --- test/filters/filters.sh | 3 +++ test/filters/seccomp-postexec.exp | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100755 test/filters/seccomp-postexec.exp (limited to 'test/filters') 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)" echo "TESTING: seccomp run files (test/filters/seccomp-run-files.exp)" ./seccomp-run-files.exp +echo "TESTING: seccomp postexec (test/filters/seccomp-postexec.exp)" +./seccomp-postexec.exp + echo "TESTING: noroot (test/filters/noroot.exp)" ./noroot.exp 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 @@ +#!/usr/bin/expect -f +# This file is part of Firejail project +# Copyright (C) 2014-2018 Firejail Authors +# License GPL v2 + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "firejail --debug --seccomp=execve\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "configuring postexec seccomp filter in" +} +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "data.architecture" +} +expect { + timeout {puts "TESTING ERROR 2\n";exit} + "monitoring pid" +} +expect { + timeout {puts "TESTING ERROR 3\n";exit} + "Sandbox monitor: waitpid" +} +expect { + timeout {puts "TESTING ERROR 4\n";exit} + "Parent is shutting down" +} +sleep 1 + +puts "all done\n" -- cgit v1.2.3-54-g00ecf