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
On Thu, Feb 24, 2000 at 11:31:43AM -0500, Alan Curry wrote:
> 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?
>
> You might get a better response if you can point to the POSIX requirement
> that getcwd() behave specifically as you describe, or that the system is not
> allowed to have additional syscalls that provide slightly more information
> than is available through opendir/readdir/etc.

Ok, a fair request and I can not currently cite the part of POSIX requiring
the behaviour I describe.

On the other hand, as Jamie.Lokier@cern.ch explained:
> To be more precise, read permission controls whether you can readdir(),
> and execute permission controls whether you can lookup entries e.g. to
> stat(), open(), readlink() or follow subdirectory etc.

Your reasoning would mean that we can implement `additional syscalls'
linuxstat(), linuxopen() and linuxreadlink() which `provide slightly
more information', e.g. by not at all looking at permissions.

Of course we can, but should we?

Harald Kirsch

--
-------------------------------------------------+------------------
Harald Kirsch, kir@iitb.fhg.de, +49 721 6091 369 |
FhG/IITB, Fraunhoferstr.1, 76131 Karlsruhe |
-
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    [from the cache]
©2003-2011 Jasper Spaans