lkml.org 
[lkml]   [2000]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: permissions not honoured by /bin/pwd aka getcwd
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/

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