From 678cd1495457318dad39178bb646ba1b96332ddb Mon Sep 17 00:00:00 2001 From: root Date: Mon, 25 Jan 2016 14:58:27 -0500 Subject: --tmpfs allowd only as root user --- test/invalid_filename.exp | 14 -------------- test/option_tmpfs.exp | 22 ++++++++++++++++++++-- test/test-root.sh | 3 +++ test/test.sh | 3 --- 4 files changed, 23 insertions(+), 19 deletions(-) (limited to 'test') diff --git a/test/invalid_filename.exp b/test/invalid_filename.exp index e496e4aaf..26563aa43 100755 --- a/test/invalid_filename.exp +++ b/test/invalid_filename.exp @@ -200,20 +200,6 @@ expect { } after 100 -send -- "firejail --debug-check-filename --tmpfs=\"bla&&bla\"\r" -expect { - timeout {puts "TESTING ERROR 13.1\n";exit} - "Checking filename bla&&bla" -} -expect { - timeout {puts "TESTING ERROR 13.2\n";exit} - "Error:" -} -expect { - timeout {puts "TESTING ERROR 13.3\n";exit} - "is an invalid filename" -} -after 100 send -- "firejail --debug-check-filename --whitelist=\"bla&&bla\"\r" expect { diff --git a/test/option_tmpfs.exp b/test/option_tmpfs.exp index 1ff47ab13..6522ef2d3 100755 --- a/test/option_tmpfs.exp +++ b/test/option_tmpfs.exp @@ -18,9 +18,27 @@ expect { } expect { timeout {puts "TESTING ERROR 2\n";exit} - "home" + "/root" } sleep 1 +send -- "exit\r" +sleep 2 -puts "\n" +send -- "firejail --debug-check-filename --tmpfs=\"bla&&bla\"\r" +expect { + timeout {puts "TESTING ERROR 13.1\n";exit} + "Checking filename bla&&bla" +} +expect { + timeout {puts "TESTING ERROR 13.2\n";exit} + "Error:" +} +expect { + timeout {puts "TESTING ERROR 13.3\n";exit} + "is an invalid filename" +} +after 100 + + +puts "\nalldone\n" diff --git a/test/test-root.sh b/test/test-root.sh index ac6b2ef00..66096f33a 100755 --- a/test/test-root.sh +++ b/test/test-root.sh @@ -2,6 +2,9 @@ ./chk_config.exp +echo "TESTING: tmpfs" +./option_tmpfs.exp + echo "TESTING: network interfaces" ./net_interface.exp diff --git a/test/test.sh b/test/test.sh index 98addc38a..985b43af0 100755 --- a/test/test.sh +++ b/test/test.sh @@ -110,9 +110,6 @@ echo "TESTING: firejail in firejail - force new sandbox" echo "TESTING: chroot overlay" ./option_chroot_overlay.exp -echo "TESTING: tmpfs" -./option_tmpfs.exp - echo "TESTING: blacklist directory" ./option_blacklist.exp -- cgit v1.2.3-54-g00ecf