From owner-freebsd-stable@FreeBSD.ORG Wed Sep 26 04:29:49 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 8A4B816A417 for ; Wed, 26 Sep 2007 04:29:49 +0000 (UTC) (envelope-from cmdlnkid@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.181]) by mx1.freebsd.org (Postfix) with ESMTP id 557A213C447 for ; Wed, 26 Sep 2007 04:29:49 +0000 (UTC) (envelope-from cmdlnkid@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so2702265waf for ; Tue, 25 Sep 2007 21:29:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:date:from:to:subject:in-reply-to:message-id:references:x-openpgp-key:mime-version:content-type; bh=ux3q6+z0T4BKEX3vVtMo3SkV03+Y8G7JnzAyCbagAIY=; b=f+JF7wUNqmDHKoZmt/CHCZ/FeQTrrTj81Is2g2yyuF2+yKchgXtV+iSocPEOkl+K4PWlkakEfy9zoNl9ysW84DHLv4PCErT9O9MF0O/oPy2o4LHV7Ci6JVfop1sMS0NXh6X/sB04IEaBPccVu939uAFCdiYQQ9ljKv9gwfNuDFI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:subject:in-reply-to:message-id:references:x-openpgp-key:mime-version:content-type; b=TYunCSCB6AaUxRdjghI9QnxP2m2M4E5/vwFGUoUBGi8TqhvQIRvM9FtdCoAGFWYMix0HpYWL2c/442vu75m73S782Bl2jbIUvPcnKnmn695ugFOg6kM6aZUWtJvRts9N7QxN7y+8MQi/w1JwP0MpjUGdaMb4lGVcnStCGbkD8PU= Received: by 10.114.60.19 with SMTP id i19mr276610waa.1190779431913; Tue, 25 Sep 2007 21:03:51 -0700 (PDT) Received: from ppp-22.180.dialinfree.com ( [209.172.22.180]) by mx.google.com with ESMTPS id 45sm235853wri.2007.09.25.21.03.48 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 25 Sep 2007 21:03:50 -0700 (PDT) Date: Wed, 26 Sep 2007 00:03:44 -0400 From: CmdLnKid To: freebsd-stable@freebsd.org In-Reply-To: <20070925175244.C21973@tribble.ilrt.bris.ac.uk> Message-ID: <20070925235826.D57927@cbynevgl.hper> References: <200709251512.l8PFCoPe006574@lurza.secnetix.de> <20070925175244.C21973@tribble.ilrt.bris.ac.uk> X-OpenPGP-Key: 0xDFFDD218 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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: Wed, 26 Sep 2007 04:29:49 -0000 On Tue, 25 Sep 2007 17:55 +0100, jan.grant wrote: > 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. > Just wanted to point out that this actually goes all the way back as far as 4.6.2-RELEASE-p27. I dont have any earlier machines than that to test on but best guess is that it most likely goes back further than that. -- - (2^(N-1))