From owner-freebsd-stable@FreeBSD.ORG Tue Sep 25 17:11:58 2007 Return-Path: Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9792616A474 for ; Tue, 25 Sep 2007 17:11:58 +0000 (UTC) (envelope-from jan.grant@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.freebsd.org (Postfix) with ESMTP id 4290213C48D for ; Tue, 25 Sep 2007 17:11:58 +0000 (UTC) (envelope-from jan.grant@bristol.ac.uk) Received: from mail.ilrt.bris.ac.uk ([137.222.16.62]) by dirg.bris.ac.uk with esmtp (Exim 4.67) (envelope-from ) id 1IaDh4-0006jY-2M; Tue, 25 Sep 2007 17:55:40 +0100 Received: from cse-jg.cse.bris.ac.uk ([137.222.12.37]:52069) by mail.ilrt.bris.ac.uk with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1IaDgs-0003LH-Qz; Tue, 25 Sep 2007 17:55:18 +0100 Date: Tue, 25 Sep 2007 17:55:18 +0100 (BST) From: Jan Grant X-X-Sender: cmjg@tribble.ilrt.bris.ac.uk To: freebsd-stable@FreeBSD.ORG In-Reply-To: <200709251512.l8PFCoPe006574@lurza.secnetix.de> Message-ID: <20070925175244.C21973@tribble.ilrt.bris.ac.uk> References: <200709251512.l8PFCoPe006574@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-ILRT-MailScanner: Found to be clean X-ILRT-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-2.659, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 1.74, BAYES_00 -2.60) X-ILRT-MailScanner-From: jan.grant@bristol.ac.uk X-Spam-Status: No X-Spam-Score: -0.8 X-Spam-Level: / Cc: Subject: Re: rm(1) bug, possibly serious X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2007 17:11:58 -0000 On Tue, 25 Sep 2007, Oliver Fromme wrote: > Note that the command "rm -rf ../" was entered twice. > The first time I got an error message (and exit code 1), > the second time it apparently succeeded. Check the man page for rm: -f Attempt to remove the files without prompting for confirma- tion, regardless of the file's permissions. If the file does not exist, do not display a diagnostic message or modify the exit status to reflect an error. That's what's happening the second time through. The first time, your current directory is getting removed (so ../ won't refer to a real directory the second time around). The bug is really in rm(1)'s initial diagnostic message. -- jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/ Tel +44 (0)117 3317661 http://ioctl.org/jan/ We thought time travel was impossible. But that was now and this is then.