Re: rm(1) bug, possibly serious



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))

_______________________________________________
freebsd-stable@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Having Trouble with a Basic Hit Counter
    ... and the second time through message ... "jqz cbig93" gets printed to the screen as an error message. ... At the same time I'm using variable <$hits> to keep track of how many ... that the first time through this section is 1 but the second ...
    (comp.lang.php)
  • Re: Having Trouble with a Basic Hit Counter
    ... and the second time through message ... "jqz cbig93" gets printed to the screen as an error message. ... At the same time I'm using variable <$hits> to keep track of how many ... that the first time through this section is 1 but the second ...
    (comp.lang.php)
  • Re: setup cannot copy file
    ... I started over and the second time I tried I had no problems! ... > Have you tested by booting on a bootable floppy and use the DOS comand to ... >>I am doing a clean install of XP pro. ... >> Still get the error message. ...
    (microsoft.public.windowsxp.setup_deployment)
  • Re: Validating Python doctype as HTML strict
    ... Groups for the second time in my long life. ... I didn't get a syntax error message at first since I was trying to ... validate python code that had no errors - all I ... got was a failed validation because the doctype ...
    (comp.lang.lisp)
  • Re: Computer crashing when connecting to the Internet
    ... Any error message or a details button you can click to get one. ... One thing is sure is that the second time you start you computer the ... Web page: http://www.generation.net/~hleboeuf/index.htm "Nick" wrote in message ... > I have Windows XP Home Edition installed at home and every> time I start my computer and double click on IE6 the> connection to the Internet comes up and starts to connect> automatically. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)