From 01f450f5313e9107f5c7caacbeae0a2f8a749449 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Sun, 1 Apr 2018 13:52:13 -0400 Subject: testing login as nobody --- test/root/login_nobody.exp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 test/root/login_nobody.exp (limited to 'test/root/login_nobody.exp') 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 @@ +#!/usr/bin/expect -f +# This file is part of Firejail project +# Copyright (C) 2014-2018 Firejail Authors +# License GPL v2 + +set timeout 10 +cd /home +spawn $env(SHELL) +match_max 100000 + +send -- "su - nobody -s /usr/bin/firejail\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Child process initialized" +} +after 100 + +send -- "cat /proc/self/status | grep Seccomp\r" +expect { + timeout {puts "TESTING ERROR 3\n";exit} + "2" +} +after 100 + +send -- "cat /proc/self/status | grep CapBnd\r" +expect { + timeout {puts "TESTING ERROR 4\n";exit} + "0000000000000000" +} +after 100 + +send -- "exit\r" +sleep 1 + +puts "\nall done\n" -- cgit v1.2.3-70-g09d2