Subject: Re: bin/6794: sh(1) . (dot) command reads files in current directory if not found in the PATH
To: ITOH Yasufumi <yasufu-i@is.aist-nara.ac.jp>
From: Andrew Brown <twofsonet@graffiti.com>
List: netbsd-bugs
Date: 01/13/1999 12:30:11
>> > 1. The . (dot) command of sh(1) reads file from current directory
>> >    if the argument doesn't contain slashes and the named file
>> >    is not found in PATH.
>> >    This may be a potential security problem.
>> 
>> problem or not...i believe this is the historical behavior and
>> shouldn't be removed.
>> 
>> fwiw - csh does the exact same thing.
>
>Well, I think the "source" command of csh is totally different from "." of sh.
>"source" does not use the command search path at all.

well...that's true.  :)

>I inspected other shells.
>
[analysis trimmed]
>
>... then, I think the . command of traditional Bourne and Korn shells
>does not see current directory if not in the PATH.

well then...perhaps i was simply "winning" all this time.  i withdraw
my objection.

>What does the POSIX specify?

no idea.  anyone else?

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."