[BusyBox 0000547]: tar archive corruption when packing unreadable files
bugs at busybox.net
bugs at busybox.net
Wed Nov 16 17:07:45 UTC 2005
The following issue has been SUBMITTED.
======================================================================
http://busybox.net/bugs/view.php?id=547
======================================================================
Reported By: aforet
Assigned To: BusyBox
======================================================================
Project: BusyBox
Issue ID: 547
Category: Standards Compliance
Reproducibility: always
Severity: major
Priority: normal
Status: assigned
======================================================================
Date Submitted: 11-16-2005 09:07 PST
Last Modified: 11-16-2005 09:07 PST
======================================================================
Summary: tar archive corruption when packing unreadable files
Description:
When trying to pack a file not readable in a tarball, the Busybox tar
applet includes an header describing the file to the tar archive, but with
no content. The resulting archive is corrupted.
For instance:
$ id
uid=500(johndoe) gid=100(users) groups=100(users)
$ ls -l file?
-rw-r--r-- 1 johndoe users 20 nov 2 2005 file1
-rw------- 1 root root 20 nov 2 2005 file2
-rw-r--r-- 1 johndoe users 20 nov 2 2005 file3
$ cat file1
this is file 1
$ cat file2
this is file 2
$ cat file3
this is file 3
$ ./busybox tar cvf test.tar file1 file2 file3
file3
file2
tar: file2: Cannot open: Permission non accordée
file1
tar: Error exit delayed from previous errors
When trying to list the content of the archive:
$ ./busybox tar tvf test.tar
-rw-r--r-- 500/100 15 2005-08-16 16:17:29 file3
-rw------- 0/0 15 2005-08-16 16:17:26 file2
tar: Invalid tar header checksum
Or when trying to extract it:
$ ./busybox tar xvf test.tar
file3
file2
tar: Invalid tar header checksum
$ cat file1
this is file 1
$ cat file2
file1$
The content of "file2" is "file1" instead of "this is file 2"!!!
Using GNU tar, the unreadable file "file2" is skipped and thus the
generated tarball is valid (it only includes file1 and file3).
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
11-16-05 09:07 aforet New Issue
11-16-05 09:07 aforet Status new => assigned
11-16-05 09:07 aforet Assigned To => BusyBox
======================================================================
More information about the busybox-cvs
mailing list