lkml.org 
[lkml]   [2000]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: permissions not honoured by /bin/pwd aka getcwd
Harald Kirsch wrote:

> The point is that on all other *nixes (as reported in the Tcl-newsgroup)
> the behaviour is different. getcwd does return `permission denied' if
> the x-flag of the current dir or any of its parents is not present.

This is an artifact of the pathname resolution scheme differences
between small memory oriented Unix and large memory oriented Linux.
In the Unix namei and vnode schemes only information required to get
the next component looked up is retained at each step. When the
lookup is complete you have the information about the terminal object,
and that's it. In the Linux scheme, the entire path is retained. The
getcwd system call is trivial in Linux. It would be very difficult
on a Unix scheme.

In the Unix scheme getcwd is a set of directory lookups. On Linux,
it's a simple fetch of a process attribute. From the viewpoint of
a security policy, either is satisfactory.

As an aside, the Linux scheme make security audit much easier. I
like it.

--

Casey Schaufler Manager, Trust Technology, SGI
casey@sgi.com voice: (650) 933-1634

-
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.130 / U:0.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site