Re: access(), test and scripts

2008-07-08 Thread Roland McGrath
> > because in fshelp_access(), as soon as user->uids contains 0, everything > > is permitted, thus making access() always return X_OK... That's wrong. It should always have been (st_mode & 0111) for root.

Re: access(), test and scripts

2008-07-08 Thread Thomas Schwinge
Hello! On Sat, May 24, 2008 at 10:44:21PM +0100, Samuel Thibault wrote: > It's quite common to see code that calls test -x to check whether the x > bit was disabled on a file, before trying to execute it. > > That does not work on the Hurd for uid 0: > > # touch foo > # ls -l foo > -rw-r--r-- 1

access(), test and scripts

2008-05-24 Thread Samuel Thibault
Hello, It's quite common to see code that calls test -x to check whether the x bit was disabled on a file, before trying to execute it. That does not work on the Hurd for uid 0: # touch foo # ls -l foo -rw-r--r-- 1 root root 0 May 24 21:31 foo # [ -x foo ] && echo erf erf # ./foo -bash: ./foo: P