From 571e8a53d6f083de8c6c90cdc9e6c48c31bb2702 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Sat, 7 May 2016 10:05:29 -0400 Subject: fix private-etc empty list --- test/fs/private-etc-empty.exp | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 test/fs/private-etc-empty.exp (limited to 'test/fs/private-etc-empty.exp') diff --git a/test/fs/private-etc-empty.exp b/test/fs/private-etc-empty.exp new file mode 100755 index 000000000..13e917a5c --- /dev/null +++ b/test/fs/private-etc-empty.exp @@ -0,0 +1,38 @@ +#!/usr/bin/expect -f +# This file is part of Firejail project +# Copyright (C) 2014-2016 Firejail Authors +# License GPL v2 + +set timeout 30 +spawn $env(SHELL) +match_max 100000 + +send -- "firejail --private-etc=blablabla\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Child process initialized" +} +sleep 1 + +send -- "ls -l /etc | wc -l\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "0" +} +send -- "exit\r" +sleep 1 + +send -- "firejail --profile=private-etc-empty.profile\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Child process initialized" +} +sleep 1 + +send -- "ls -l /etc | wc -l\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "0" +} + +puts "\nall done\n" -- cgit v1.2.3-54-g00ecf