Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 54827 - Invalid tar files caused by multiply-linked sockets
Invalid tar files caused by multiply-linked sockets
Product: Red Hat Linux
Classification: Retired
Component: tar (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2001-10-19 19:54 EDT by Paul Menage
Modified: 2007-04-18 12:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-10-19 19:54:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Paul Menage 2001-10-19 19:54:12 EDT
Description of Problem:

When tar encounters a socket it ignores it. However, it appears to do this
*after* storing an entry for the inode number in its lookup table. If it
then encounters additional links to the same inode, it just stores them as
hard links to the original filename. But since it ignored the original
filename, attempts to unpack the tar file will fail, as the links refer to
a missing socket.

The check for the inode being a socket should occur before the inode/path
mapping is inserted in the lookup table; then later instances of the same
inode will also be ignored. 

Version-Release number of selected component (if applicable):


How Reproducible:


Steps to Reproduce:
1. cd /dev; ln log log2
2. tar cf /tmp/sock.tar log log2 null

Actual Results:

[root@qa55 /dev]# tar cf /tmp/sock.tar log log2 null
tar: log: socket ignored
[root@qa55 /dev]# tar tvf /tmp/sock.tar 
-rw-rw-rw- root/root         0 2001-10-17 16:04:43 log2 link to log
crw-rw-rw- root/root       1,3 2001-03-23 20:37:44 null

Expected Results:

Two 'socket ignored' messages and a valid tar file containing neither log
nor log2

Additional Information:
Comment 1 Bernhard Rosenkraenzer 2001-10-23 09:20:24 EDT
I've fixed it in 1.13.25-2.

Note You need to log in before you can comment on or make changes to this bug.