From 2905b9f9ab5c5ed6f9210d1d843a8bcf41451854 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Sat, 23 Apr 2016 08:53:07 -0400 Subject: make test-utils --- test/utils/caps-print.exp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 test/utils/caps-print.exp (limited to 'test/utils/caps-print.exp') diff --git a/test/utils/caps-print.exp b/test/utils/caps-print.exp new file mode 100755 index 000000000..9cc4b1872 --- /dev/null +++ b/test/utils/caps-print.exp @@ -0,0 +1,32 @@ +#!/usr/bin/expect -f +# This file is part of Firejail project +# Copyright (C) 2014-2016 Firejail Authors +# License GPL v2 + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "firejail --name=test\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Child process initialized" +} +sleep 2 + +spawn $env(SHELL) +send -- "firejail --caps.print=test\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "setgid - disabled" +} +expect { + timeout {puts "TESTING ERROR 2\n";exit} + "setuid - disabled" +} +expect { + timeout {puts "TESTING ERROR 3\n";exit} + "net_raw - disabled" +} +sleep 1 +puts "\nall done\n" -- cgit v1.2.3-54-g00ecf