Re: rm(1) bug, possibly serious



On 9/25/07, Oliver Fromme <olli@xxxxxxxxxxxxxxxxx> wrote:
Torfinn Ingolfsen wrote:
> Oliver Fromme wrote:
>
> > $ cd /tmp
> > $ mkdir -p foo/var
> > $ cd foo/bar
> > $ rm -rf ../
> > rm: ../: Invalid argument
> > $ rm -rf ../
> > $
> >
[...]
> Quick testing here:
> [...]
> Ok, I think it is a bug.

Yes, I think so, too.

By the way, an additional confusion is that ".." and "../"
are handled differently. Specifying ".." always leads to
this message:

rm: "." and ".." may not be removed

and nothing is actually removed. It is confusing that
adding a slash leads to a different error message _and_
removal of the contents of the parent directory. Clearly
a POLA violation.

Maybe. But I expect that the behavior for "rm -rf .." is there so that
things don't get REALLY astonishing when you do "rm -rf *". Having a
different behavior for "rm -rf ../" may have been intentional on
someone's part so you can override the protection if you really want
to.

- Bob
_______________________________________________
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: Unable to Read File
    ... >>there's a bug in the password facility. ... | I backup regularly, but don't believe this is a backup ... |>| I've recently begun receiving error message "Unable to ...
    (microsoft.public.excel.misc)
  • Re: Strangest VC8 bug yet
    ... The most amazing thing about this error is that the error message shows that an extra 's' has been added to the ... If I try to reduce the code by removing lines which would ordinarily not be included anyway because of preprocessor #if commands, the bug goes away. ... Compiling for VC8, in one situation if I comment out the above lines, the bug still shows later on in the code but if I totally remove the lines the bug goes away!!! ... But there is a serious bug here somewhere in the compiler which is normally being buried The source file is a large one, with 3377 lines and a single routine made up largely of switch statements, and nested switch statements, taking up about 2200 lines. ...
    (microsoft.public.vc.language)
  • Re: What is wrong with this simple command?
    ... more than the two commands and the error message to guess at the ... When you execute a OS shell commmand (like, ... route as it is a very expensive method for executing shell commands. ... believe the error messages and start looking for an enormous bug. ...
    (comp.lang.tcl)
  • Update: Re: GTK update problems
    ... In my case, multi-gnome-terminal failed to start, leaving an error message in .xsession-errors. ... It seems to breaks totem, which issues many copies of the following error message: ... > This probably reflects a bug in the program. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Re: Strangest VC8 bug yet
    ... The most amazing thing about this error is that the error message shows that an extra 's' has been added to the ... If I try to reduce the code by removing lines which would ordinarily not be included anyway because of preprocessor #if commands, the bug goes away. ... Eventually MS will test out my bug report and perhaps tell me what is going on, but I have to continue on in my own development in the meantime. ...
    (microsoft.public.vc.language)