From 173a90129e73e81fa80bb12f6ec19e3943c74ca5 Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Sun, 7 Aug 2016 18:05:45 +0200 Subject: tar requires shell for executing compressors like bzip2 --- etc/tar.profile | 2 +- test/sysutils/tar.exp | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/etc/tar.profile b/etc/tar.profile index 6daa7396a..78bf7ad13 100644 --- a/etc/tar.profile +++ b/etc/tar.profile @@ -8,7 +8,7 @@ net none shell none # support compressed archives -private-bin tar,gtar,compress,gzip,lzma,xz,bzip2,lbzip2,lzip,lzop +private-bin sh,tar,gtar,compress,gzip,lzma,xz,bzip2,lbzip2,lzip,lzop private-dev private-etc passwd,group,localtime hostname tar diff --git a/test/sysutils/tar.exp b/test/sysutils/tar.exp index af569f5ac..f41d67d6f 100755 --- a/test/sysutils/tar.exp +++ b/test/sysutils/tar.exp @@ -9,20 +9,31 @@ match_max 100000 send -- "firejail /bin/tar -cjvf firejail_t2 /usr/share/doc/firejail\r" expect { - timeout {puts "TESTING ERROR 1\n";exit} + timeout {puts "TESTING ERROR 1.1\n";exit} + "Error" {puts "TESTING ERROR 1.2\n";exit} "/usr/share/doc/firejail/README" } after 100 +send -- "stat -c '|%s|' firejail_t2; uname -s\r" +expect { + timeout {puts "TESTING ERROR 2.1\n";exit} + "|0|" {puts "TESTING ERROR 2.2\n";exit} + "Linux" +} +sleep 1 + send -- "firejail /bin/tar --compare --file=firejail_t2 -C / | wc\r" expect { - timeout {puts "TESTING ERROR 2\n";exit} + timeout {puts "TESTING ERROR 3.1\n";exit} + "This does not look like a tar archive" {puts "TESTING ERROR 3.2\n"; exit} " 0 0 0" } sleep 1 send -- "/bin/tar --compare --file=firejail_t2 -C / | wc\r" expect { - timeout {puts "TESTING ERROR 3\n";exit} + timeout {puts "TESTING ERROR 4.1\n";exit} + "This does not look like a tar archive" {puts "TESTING ERROR 4.2\n"; exit} " 0 0 0" } sleep 1 -- cgit v1.2.3-54-g00ecf