Bourne Shell Bug ( test ops )

Alex B Laney alex at xios.UUCP
Fri Oct 24 01:21:15 AEST 1986


References:
Sender: 
Reply-To: alex at xios.UUCP (Alex B Laney)
Followup-To: 
Distribution: na
Organization: Xios systems corp, The Renaissance(tm) people
Keywords: sh, test, bug


I have seen this bug in SVR2 systems (see below). My question is --
Has this been fixed in SVR3?

Some background on this bug. I was logged in as root. ( It is not a bug for a
regular user.) I have seen this on 3b2's, Ncr Towers, CT MightyFrames. I
think that a case could be made for the test -r and test -w, ( because it is
root ) but definitely not for test -x working in this way.
The other test ops appear to work correctly. 

This can't be a feature!

Script started on Thu Oct 23 09:31:01 1986
# cat mk
:
echo hello
# ls -l mk
-rw-r--r--   1 root     root          13 Oct 23 09:30 mk
# test -x mk && echo yes
yes
# chmod 000 mk
# test -x mk && echo yes
yes
# test -r mk && echo yes
yes
# test -w mk && echo yes
yes
# mk
mk: cannot execute
# chmod 700 mk
# mk
hello
# chmod 000 mk
# test -x mk
# test -x mk && echo yes
yes
script done on Thu Oct 23 09:33:12 1986

( The "script" command comes with CT machines. )

I do some work with shell scripts for overnight backups and such, and I run
into this because I would have liked to used the execute permission as a way
for configuration at a site.

-- 
			- + - + -
 Alex Laney, Xios Systems Corp, 105-1600 Carling Av, Ottawa (613)725-5411x402
              		    utzoo -
				    > !dciem
	   allegra!ihnp4!utcsri --	      > nrcaer!xios!lib!alex
ucbvax!hplabs --			     /
		> !seismo!hadron!netex!prcrs/
      decvax --



More information about the Comp.unix mailing list