Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Oct 2006 02:03:50 -0800
From:      <soralx@cydem.org>
To:        freebsd-hackers@freebsd.org
Subject:   Re: [patch] rm can have undesired side-effects
Message-ID:  <20061030020350.4d58e461@soralx.cydem.org>
In-Reply-To: <20061030103212.13e6ad07@loki.starkstrom.lan>
References:  <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <45455f6a.yNcc0kkyEKpoRv3m%perryh@pluto.rain.com> <20061030083849.GB871@turion.vk2pj.dyndns.org> <20061030103212.13e6ad07@loki.starkstrom.lan>

next in thread | previous in thread | raw e-mail | index | archive | help

> > protections at a later date.  Unless Alice notices that her file
> > has a second link before she deletes it, when she issues "rm -P",
> > she will lose her link to the file (and her only way of uniquely
> > identifying it) whilst leaving the remaining link to the file in
> > Mallory's control.

well, that's the whole point of '-P' -- erase file's data _before_
unlinking the file, is it not?

> That isn't really that nice, true. But why can i link files that I
> have no business with in the first place? Is there is specific reason?

if you can't see the contents of other user's directory (think '0750')
you really will get no buisiness there, whether you want it or not

Of course, one must be careful when using `rm -P` (which, ironically,
is very likely to happen in limited-time situations), and even the
protection of requiring the '-f' flag if {(inode count) > 1} is
inadequate protection for fools like me (who are used to good ol'
`rm -rf` on large directory structures) ;P

[SorAlx]  ridin' VN1500-B2



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061030020350.4d58e461>