aboutsummaryrefslogtreecommitdiffstats
path: root/test/root
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2018-04-01 13:52:13 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2018-04-01 13:52:13 -0400
commit01f450f5313e9107f5c7caacbeae0a2f8a749449 (patch)
tree20fc7ee270ee96dd28d55a51e48e8a52430e39c4 /test/root
parenttesting ssh (diff)
downloadfirejail-01f450f5313e9107f5c7caacbeae0a2f8a749449.tar.gz
firejail-01f450f5313e9107f5c7caacbeae0a2f8a749449.tar.zst
firejail-01f450f5313e9107f5c7caacbeae0a2f8a749449.zip
testing login as nobody
Diffstat (limited to 'test/root')
-rwxr-xr-xtest/root/login_nobody.exp35
-rwxr-xr-xtest/root/root.sh3
2 files changed, 38 insertions, 0 deletions
diff --git a/test/root/login_nobody.exp b/test/root/login_nobody.exp
new file mode 100755
index 000000000..8e9ec4367
--- /dev/null
+++ b/test/root/login_nobody.exp
@@ -0,0 +1,35 @@
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
6set timeout 10
7cd /home
8spawn $env(SHELL)
9match_max 100000
10
11send -- "su - nobody -s /usr/bin/firejail\r"
12expect {
13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized"
15}
16after 100
17
18send -- "cat /proc/self/status | grep Seccomp\r"
19expect {
20 timeout {puts "TESTING ERROR 3\n";exit}
21 "2"
22}
23after 100
24
25send -- "cat /proc/self/status | grep CapBnd\r"
26expect {
27 timeout {puts "TESTING ERROR 4\n";exit}
28 "0000000000000000"
29}
30after 100
31
32send -- "exit\r"
33sleep 1
34
35puts "\nall done\n"
diff --git a/test/root/root.sh b/test/root/root.sh
index 3a20e4ba4..4132bc739 100755
--- a/test/root/root.sh
+++ b/test/root/root.sh
@@ -80,6 +80,9 @@ echo "TESTING: join (test/root/join.exp)"
80echo "TESTING: git-install (test/root/git.exp)" 80echo "TESTING: git-install (test/root/git.exp)"
81./git.exp 81./git.exp
82 82
83echo "TESTING: login-nobody (test/root/login_nobody.exp)"
84./login_nobody.exp
85
83#******************************** 86#********************************
84# seccomp 87# seccomp
85#******************************** 88#********************************