lkml.org 
[lkml]   [1999]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: rmdir of one's pwd (was Re: rmdir of a busy directory)
[Linus and Andreas stripped from mass-Cc, they surely know about it.]

On 1999-02-12 at 09:49:14, Linus Torvalds wrote:
> On 12 Feb 1999, Andreas Schwab wrote:
> > This patch is wrong, it also forbids `rmdir ../foo'. Only a path ending
> > in '.' is special. Think about it: to find out the real name of the entry
> > to unlink you'll have find its link in the parent directory. With `.' you
> > simply don't have enough information about what to unlink.
>
> Actually, you do.
>
> _I_ think "." just means "current working directory".

For forgetful people, this is all well known, and discussed before, with
additional details, just look in any linux-kernel archive, and search
for the subject 'rmdir(".") works, and causes havoc'. One example is at:

http://www.uwsg.indiana.edu/hypermail/linux/kernel/9708.0/date.html

(Yup, about 18 months old.. Breaks my unreleased theory about each
dubious topic coming up 12 months later with a solution :)

There was a more serious bug then, but rmdir(".") is just interesting,
and nice, IMHO too. But as sct said, opendir(".") later on showing an
empty dir is not quite intuitive.

--
Janos - Don't worry, my address is real. I'm just bored of spam.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.084 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site