Re: permissions not honoured by /bin/pwd aka getcwd

From: Harald Kirsch (kir@iitb.fhg.de)
Date: Thu Feb 24 2000 - 10:03:18 EST


On Thu, Feb 24, 2000 at 03:28:07PM +0100, Andreas Schwab wrote:
> Harald Kirsch <kir@iitb.fhg.de> writes:
>
> |> Why is /bin/pwd (or getcwd) allowed to return an output in the following
> |> command sequence?
> |>
> |>
> |> % mkdir -p really/closed; cd really/closed; chmod 000 ..; /bin/pwd
> |> /home1_phys/kir/sunHome/tmp/really/closed
>
> Why not? Hint: look for sys_getcwd in the sources

What kind of explanation is this. Of course I'll find in the sources
that the system does what is coded in the sources ... surprise.

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?

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/



This archive was generated by hypermail 2b29 : Tue Feb 29 2000 - 21:00:10 EST