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

It's EACCES :-) Note that it (*) says for EINVAL and ERANGE: "If any of
the following conditions occur, [...]". Considering that 2.4, paragraph
says an implementation may _not_ detect certain conditions, this seems
to imply that an implementation is allowed not to check for EACCES.

So this looks good.

(* my copy is ISO/IEC 9945-1 ANSI/IEEE Std 1003.1 1996-07-12)

- Werner

--
_________________________________________________________________________
/ Werner Almesberger, ICA, EPFL, CH werner.almesberger@ica.epfl.ch /
/_IN_N_032__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/

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