From 80cc5fa809ebb3f213852312dea15cded00cc069 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Sun, 20 Nov 2016 16:05:45 -0500 Subject: chroot testing --- test/chroot/unchroot-as-root.exp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 test/chroot/unchroot-as-root.exp (limited to 'test/chroot/unchroot-as-root.exp') 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 @@ +#!/usr/bin/expect -f + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "firejail --chroot=/tmp/chroot\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Error: --chroot option is not available on Grsecurity systems" {puts "\nall done\n"; exit} + "Child process initialized" {puts "chroot available\n"}; +} +sleep 1 + +send -- "cd /\r" +after 100 + + +send -- "./unchroot\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "Bad system call" +} +after 100 + +puts "all done\n" + -- cgit v1.2.3-54-g00ecf