PATH bug?

Hokey hokey at plus5.UUCP
Thu Aug 1 16:25:38 AEST 1985


If the current directory is specified as the last directory searched using
a trailing ":" instead of ":." (in $PATH) then sh will not find executable
files in the current directory.

The problem only seems to occur when the current directory is searched last.

I have noticed this bug under Vr0 and Vr2.  Is this problem more widespread
than just my vendor?

The following shar file demosntrates the bug using "make" on my machine.
Additionally, if the unpacking is done in, for example, /tmp, the bug
can also be demonstrated by the sequence:

	$ cd /tmp
	$ PATH=/:
	$ ls -l showbug
	-rwxrwxr-x   1 hokey    usr            9 Aug  1 00:54 showbug
	$ showbug
	showbug: not found
---
# This is a shell archive.  Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
#
# Wrapped by hokey on Thu Aug  1 00:56:39 CDT 1985
# Contents:  makefile showbug
 
echo x - makefile
sed 's/^@//' > "makefile" <<'@//E*O*F makefile//'
# If the next line reads "PATH=/usr/bin:/bin:." then all is well.
PATH=/usr/bin:/bin:
SHELL=/bin/sh

all:
	set ; showbug
@//E*O*F makefile//
chmod u=rw,g=rw,o=r makefile
 
echo x - showbug
sed 's/^@//' > "showbug" <<'@//E*O*F showbug//'
echo Foo
@//E*O*F showbug//
chmod u=rwx,g=rwx,o=rx showbug
 
exit 0
-- 
Hokey           ..ihnp4!plus5!hokey
		  314-725-9492



More information about the Net.bugs.usg mailing list