diff options
-rw-r--r-- | etc/tar.profile | 2 | ||||
-rwxr-xr-x | 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 | |||
8 | shell none | 8 | shell none |
9 | 9 | ||
10 | # support compressed archives | 10 | # support compressed archives |
11 | private-bin tar,gtar,compress,gzip,lzma,xz,bzip2,lbzip2,lzip,lzop | 11 | private-bin sh,tar,gtar,compress,gzip,lzma,xz,bzip2,lbzip2,lzip,lzop |
12 | private-dev | 12 | private-dev |
13 | private-etc passwd,group,localtime | 13 | private-etc passwd,group,localtime |
14 | hostname tar | 14 | 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 | |||
9 | 9 | ||
10 | send -- "firejail /bin/tar -cjvf firejail_t2 /usr/share/doc/firejail\r" | 10 | send -- "firejail /bin/tar -cjvf firejail_t2 /usr/share/doc/firejail\r" |
11 | expect { | 11 | expect { |
12 | timeout {puts "TESTING ERROR 1\n";exit} | 12 | timeout {puts "TESTING ERROR 1.1\n";exit} |
13 | "Error" {puts "TESTING ERROR 1.2\n";exit} | ||
13 | "/usr/share/doc/firejail/README" | 14 | "/usr/share/doc/firejail/README" |
14 | } | 15 | } |
15 | after 100 | 16 | after 100 |
16 | 17 | ||
18 | send -- "stat -c '|%s|' firejail_t2; uname -s\r" | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 2.1\n";exit} | ||
21 | "|0|" {puts "TESTING ERROR 2.2\n";exit} | ||
22 | "Linux" | ||
23 | } | ||
24 | sleep 1 | ||
25 | |||
17 | send -- "firejail /bin/tar --compare --file=firejail_t2 -C / | wc\r" | 26 | send -- "firejail /bin/tar --compare --file=firejail_t2 -C / | wc\r" |
18 | expect { | 27 | expect { |
19 | timeout {puts "TESTING ERROR 2\n";exit} | 28 | timeout {puts "TESTING ERROR 3.1\n";exit} |
29 | "This does not look like a tar archive" {puts "TESTING ERROR 3.2\n"; exit} | ||
20 | " 0 0 0" | 30 | " 0 0 0" |
21 | } | 31 | } |
22 | sleep 1 | 32 | sleep 1 |
23 | send -- "/bin/tar --compare --file=firejail_t2 -C / | wc\r" | 33 | send -- "/bin/tar --compare --file=firejail_t2 -C / | wc\r" |
24 | expect { | 34 | expect { |
25 | timeout {puts "TESTING ERROR 3\n";exit} | 35 | timeout {puts "TESTING ERROR 4.1\n";exit} |
36 | "This does not look like a tar archive" {puts "TESTING ERROR 4.2\n"; exit} | ||
26 | " 0 0 0" | 37 | " 0 0 0" |
27 | } | 38 | } |
28 | sleep 1 | 39 | sleep 1 |