Date: Tue, 25 Sep 2007 22:38:46 +0200 (CEST) From: Oliver Fromme <olli@lurza.secnetix.de> To: freebsd-stable@FreeBSD.ORG, fbsd-stable-0@ml.turing-complete.org Subject: Re: rm(1) bug, possibly serious Message-ID: <200709252038.l8PKckmm019303@lurza.secnetix.de> In-Reply-To: <20070925190407.GA39037@mid.pc5.i.0x5.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Nicolas Rachinsky wrote: > Oliver Fromme wrote: > > 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. > > Adding a slash often leads to different behaviour. Yes, I'm aware of that. I often make use of the feature that "find /sys/" expands the symlink, while "find /sys" does not. The same holds true for ls(1). However, I would still argue that there is no sane reason for "rm -rf ../" behaving differently from "rm -rf ..", especially because it behaves differently in a destructive way. That's why I call it a POLA violation. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd Python is executable pseudocode. Perl is executable line noise.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709252038.l8PKckmm019303>