Re: rm(1) bug, possibly serious
- From: "Bob Johnson" <fbsdlists@xxxxxxxxx>
- Date: Tue, 25 Sep 2007 21:38:30 -0400
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"
- Follow-Ups:
- Re: rm(1) bug, possibly serious
- From: Oliver Fromme
- Re: rm(1) bug, possibly serious
- References:
- Re: rm(1) bug, possibly serious
- From: Torfinn Ingolfsen
- Re: rm(1) bug, possibly serious
- From: Oliver Fromme
- Re: rm(1) bug, possibly serious
- Prev by Date: Re: FreeBSD PseudoRAID RAID0 array broken on atapci1: <Intel ICH5 SATA150 controller>
- Next by Date: Re: rm(1) bug, possibly serious
- Previous by thread: Re: rm(1) bug, possibly serious
- Next by thread: Re: rm(1) bug, possibly serious
- Index(es):
Relevant Pages
|