Messages in this thread | | | From | Peter Chubb <> | Date | Fri, 25 Feb 2000 08:55:07 +1100 (EST) | Subject | Re: permissions not honoured by /bin/pwd aka getcwd |
| |
>>>>> "Alan" == Alan Curry <pacman-kernel@cqc.com> writes:
Alan> Harald Kirsch writes the following: >> 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. >> >> But maybe all other systems are not POSIX and Linux is or Linux knows >> better than POSIX?
Alan> You might get a better response if you can point to the POSIX requirement Alan> that getcwd() behave specifically as you describe, or that the system is not Alan> allowed to have additional syscalls that provide slightly more information Alan> than is available through opendir/readdir/etc.
The posix.1 spec for getcwd says this:
(section 5.2.2.4)For each of the following conditions, if the condition is detected, the getcwd() function shall return a value of NULL and set errno to the corresponding value:
[EACCESS] Read or search permission was denied for a component of the pathname.
The Posix.2 spec for /bin/pwd does not impose the same restrictions --- /bin/pwd always works (barring disk errors).
Peter C
- 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/
| |