lkml.org 
[lkml]   [2000]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: 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/

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