aboutsummaryrefslogtreecommitdiffstats
path: root/test/chroot/unchroot-as-root.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-11-20 16:05:45 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-11-20 16:05:45 -0500
commit80cc5fa809ebb3f213852312dea15cded00cc069 (patch)
tree2f233a23c075a0dd2e89b32b37b09fce06b13058 /test/chroot/unchroot-as-root.exp
parentseccomp work 2 (diff)
downloadfirejail-80cc5fa809ebb3f213852312dea15cded00cc069.tar.gz
firejail-80cc5fa809ebb3f213852312dea15cded00cc069.tar.zst
firejail-80cc5fa809ebb3f213852312dea15cded00cc069.zip
chroot testing
Diffstat (limited to 'test/chroot/unchroot-as-root.exp')
-rwxr-xr-xtest/chroot/unchroot-as-root.exp27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/chroot/unchroot-as-root.exp b/test/chroot/unchroot-as-root.exp
new file mode 100755
index 000000000..9f8a1d784
--- /dev/null
+++ b/test/chroot/unchroot-as-root.exp
@@ -0,0 +1,27 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail --chroot=/tmp/chroot\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Error: --chroot option is not available on Grsecurity systems" {puts "\nall done\n"; exit}
11 "Child process initialized" {puts "chroot available\n"};
12}
13sleep 1
14
15send -- "cd /\r"
16after 100
17
18
19send -- "./unchroot\r"
20expect {
21 timeout {puts "TESTING ERROR 1\n";exit}
22 "Bad system call"
23}
24after 100
25
26puts "all done\n"
27