Bug 408621 - tar -vf /dev/stdout produces corrupted tar archives
tar -vf /dev/stdout produces corrupted tar archives
Product: Fedora
Classification: Fedora
Component: tar (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-12-03 08:52 EST by Alexander Todorov
Modified: 2008-05-26 12:57 EDT (History)
0 users

See Also:
Fixed In Version: tar-1.17-5.fc9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-26 12:57:45 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 Alexander Todorov 2007-12-03 08:52:27 EST
Description of problem:
When using -v (verbose) and -f (output file) options and specifying /dev/stdout
as argument tar produces corrupted archive.

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

How reproducible:

Steps to Reproduce:
1. tar -cvf /dev/stdout [files or dirs] > output.tar
Actual results:
resulting file is not a valid tar archive. the file listing is mixed with actual

Expected results:

Additional info:
Long description of the problem:

When using -f file listing is printed on stdout. Tar is not checking if the
argument to -f is "/dev/stdout". When not using -f standard output is assumed by
default and tar will send file listing to stderr.

That's bug either in code or documentation. I haven't seen manual page
indicating that -v and -f may lead to corrupted archives. The "-f /dev/stdout"
is not really necessary but it's used to make the command more human friendly.
Comment 2 RHEL Product and Program Management 2007-12-03 15:48:06 EST
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release.  This request will
be reviewed for a future Red Hat Enterprise Linux release.
Comment 8 Bug Zapper 2008-05-14 00:04:41 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
Comment 9 Ondrej Vasik 2008-05-26 12:57:45 EDT
As I'm new tar maintainer - and as the fixed manpage is part of F9/Rawhide tar,
closing that bugzilla RAWHIDE. Feel free to add any comments if you have
something to discuss about that issue.

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