aboutsummaryrefslogtreecommitdiffstats
path: root/test/filters/seccomp-su.exp
diff options
context:
space:
mode:
authorLibravatar curiosity-seeker <seeker@posteo.org>2016-12-15 12:58:32 +0100
committerLibravatar GitHub <noreply@github.com>2016-12-15 12:58:32 +0100
commitd8ee390a6ca56fde4baad57dea7572c39d595809 (patch)
tree255252b15232086e6f65203cda676859ab4117a0 /test/filters/seccomp-su.exp
parentUpdate quiterss.profile (diff)
parentadded a 1 second delay after xpra server is started (diff)
downloadfirejail-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-xtest/filters/seccomp-su.exp40
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
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --noprofile --seccomp\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized"
14}
15sleep 2
16
17send -- "sudo su -\r"
18expect {
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
24send -- "sudo ls\r"
25expect {
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
31send -- "ping google.com\r"
32expect {
33 timeout {puts "TESTING ERROR 3\n";exit}
34 "Operation not permitted" {puts "OK\n"}
35 "unknown host" {puts "OK\n"}
36}
37
38send -- "exit\r"
39after 100
40puts "all done\n"