From owner-freebsd-bugs Tue Jan 7 03:00:04 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id DAA15105 for bugs-outgoing; Tue, 7 Jan 1997 03:00:04 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id DAA15077; Tue, 7 Jan 1997 03:00:02 -0800 (PST) Resent-Date: Tue, 7 Jan 1997 03:00:02 -0800 (PST) Resent-Message-Id: <199701071100.DAA15077@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, Received:"from dfw-ix8.ix.netcom.com (dfw-ix8.ix.netcom.com [206.214.98.8]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id CAA15000 for" ; Tue, 7 Jan 1997 02:57:33.-0800 (PST) Received: from silvia.HIP.Berkeley.EDU (wck-ca14-58.ix.netcom.com [207.92.174.122]) by dfw-ix8.ix.netcom.com (8.6.13/8.6.12) with ESMTP id CAA09955 for ; Tue, 7 Jan 1997 02:56:49 -0800 Received: (from asami@localhost) by silvia.HIP.Berkeley.EDU (8.8.4/8.6.9) id CAA03829; Tue, 7 Jan 1997 02:56:20 -0800 (PST) Message-Id: <199701071056.CAA03829@silvia.HIP.Berkeley.EDU> Date: Tue, 7 Jan 1997 02:56:20 -0800 (PST) From: asami@freebsd.org To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: gnu/2394: tar will extract files even if -C command fails Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >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: