Bug 54827 - Invalid tar files caused by multiply-linked sockets
Summary: Invalid tar files caused by multiply-linked sockets
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: tar   
(Show other bugs)
Version: 7.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: Ben Levenson
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-10-19 23:54 UTC by Paul Menage
Modified: 2007-04-18 16:37 UTC (History)
0 users

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


Attachments (Terms of Use)

Description Paul Menage 2001-10-19 23:54:12 UTC
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):

tar-1.13.19-4

How Reproducible:

Always

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 13:20:24 UTC
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.