[PATCH] ash: make bash_source command search current directory after PATH

Bernd Petrovitsch bernd at petrovitsch.priv.at
Sun Jan 28 18:51:08 UTC 2018


On Fri, 2018-01-26 at 15:15 +0100, Denys Vlasenko wrote:
> On Fri, Jan 26, 2018 at 9:34 AM, Paul Otto <paul at ottoops.com> wrote:
[...]
> > According to the BASH documentation, the source command should:
> > Read and execute commands from filename  in  the  current  shell environment
> > and return the exit status of the last command executed from filename.  If
> > filename does not contain a slash, filenames  in  PATH  are used to find the
> > directory containing filename.  The file searched for in PATH  need  not  be
> > executable. When  bash  is  not  in  posix  mode,  the  current directory is
> > searched if no file is found in PATH.
> 
> I wish bash wouldn't introduce gratuitous standard violations.

I see such begaviour more as a security problem - there are good
reasons not using "." automagically in $PATH (like DOS did .....).

Kind regards,
	Bernd

PS: POSIX has some stuff in it which actually requires violation.
-- 
Bernd Petrovitsch                  Email : bernd at petrovitsch.priv.at
                     LUGA : http://www.luga.at


More information about the busybox mailing list