Date: Tue, 7 Jan 1997 02:56:20 -0800 (PST) From: asami@freebsd.org To: FreeBSD-gnats-submit@freebsd.org Subject: gnu/2394: tar will extract files even if -C command fails Message-ID: <199701071056.CAA03829@silvia.HIP.Berkeley.EDU> Resent-Message-ID: <199701071100.DAA15077@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 2394 >Category: gnu >Synopsis: tar will extract files even if -C command fails >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Jan 7 03:00:01 PST 1997 >Last-Modified: >Originator: Satoshi Asami >Organization: The FreeBSD Project >Release: FreeBSD 3.0-CURRENT i386 >Environment: It's up there. >Description: When you execute the command: tar -C /nonexistent/path -xf tarfile tar will complain about -C failing but will extract the files (in the current directory) anyway. This can be especially disastrous if the command is actually the second half of a pipe, as in tar cf - . | tar -C /nonexistent/path -xf - because this can cause files in the current directory to be truncated and then padded with zeros. (A surefire way to destroy your root partition while trying to back it up.) >How-To-Repeat: It's up there. >Fix: Tried to fix it myself but got lost in the spaghetti of conditionals. ;) >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701071056.CAA03829>