Subject: bin/31923: pax-as-tar ignores -k, overwrites existing files
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <svs+pr@grep.ru>
List: netbsd-bugs
Date: 10/26/2005 23:00:00
>Number:         31923
>Category:       bin
>Synopsis:       pax-as-tar ignores -k, overwrites existing files
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 26 23:00:00 +0000 2005
>Originator:     Sergey Svishchev
>Release:        3.99.7
>Organization:
>Environment:
>Description:
The option is accepted by pax and pax-as-tar, but existing files are, nevertheless, overwritten.
>How-To-Repeat:
% mkdir kflag
% echo K > kflag/K
% tar -cvf kflag.tar kflag
kflag
kflag/K
tar: ustar vol 1, 2 files, 0 bytes read, 10240 bytes written in 1 secs (10240 bytes/sec)
% echo @ > kflag/K
% tar -xvkf kflag.tar
kflag
kflag/K
tar: ustar vol 1, 2 files, 10240 bytes read, 0 bytes written in 1 secs (10240 bytes/sec)
% cat kflag/K
K
% echo @ > kflag/K
% pax -rkvf kflag.tar
pax: Trying to read GNU tar archive with extensions off
kflag
kflag/K
pax: ustar vol 1, 2 files, 10240 bytes read, 0 bytes written in 1 secs (10240 bytes/sec)
% cat kflag/K
K

>Fix: