tar requires shell for executing compressors like bzip2

This commit is contained in:
Reiner Herrmann 2016-08-07 18:05:45 +02:00
parent 5a8bbefe20
commit 173a90129e
2 changed files with 15 additions and 4 deletions

View file

@ -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

View file

@ -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