Re: permissions not honoured by /bin/pwd aka getcwd

From: Riley Williams (rhw@MemAlpha.cx)
Date: Sun Feb 27 2000 - 06:00:08 EST


Hi Peter.

>>>> Again, is there any sensible reason to deny a process the
>>>> knowledge of its CWD?

>>> Vaguely, "security". Perms changes by root don't affect
>>> processes already inside the barrier.

>> And said processes could very well do a getcwd(3) as first
>> order of business in order to be able to cheat later on.

> Yes. What happens if one renames elements of the path under
> the feet of a process in unix, btw? I asssume the process
> ends up with an invalid cwd and starts having a lot of
> trouble going anywhere.

Even easier is to delete an empty directory that's the CWD of a
process. The delete works fine, with the result that the process
in question can't do `cd ..` or any relative cd but has to do an
absolute cd or a `cd ~` to get anywhere.

I've done that several times, usually by accident.

Best wishes from Riley.

-
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/



This archive was generated by hypermail 2b29 : Tue Feb 29 2000 - 21:00:17 EST