Bourne Shell Bug ( test ops )

Bob Lenk rml at hpfcdc.HP.COM
Tue Oct 28 09:50:00 AEST 1986


> This is a difficult call.  "test" solves it in the most straightforward
> fashion, by just reporting the results of the "access" system call.

I agree that the implementation of test(1) is reasonable.  I think that
the behavior of access(2) should be considered a bug.  When checking for
execute permission on a non-directory (or an ordinary file, execute
permission on other types is a don't care), it should use the same rules
as exec, requiring at least one execute bit to be set.  I know of no
advantage to the current behavior (other than making the kernel code
slightly simpler).  The IEEE P1003 working group has recently decided to
require this behavior, despite the fact that most current
implementations don't work this way.

		Bob Lenk
		{hplabs, ihnp4}!hpfcla!rml



More information about the Comp.unix mailing list