Date: Wed, 26 Sep 2007 00:03:44 -0400 From: CmdLnKid <cmdlnkid@gmail.com> To: freebsd-stable@freebsd.org Subject: Re: rm(1) bug, possibly serious Message-ID: <20070925235826.D57927@cbynevgl.hper> In-Reply-To: <20070925175244.C21973@tribble.ilrt.bris.ac.uk> References: <200709251512.l8PFCoPe006574@lurza.secnetix.de> <20070925175244.C21973@tribble.ilrt.bris.ac.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
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))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070925235826.D57927>