Messages in this thread | | | Date | Thu, 24 Feb 2000 09:48:16 -0800 | From | Casey Schaufler <> | Subject | Re: 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/
| |