logo       

Re: ash 'source' command: msg#00154

linux.busybox

Subject: Re: ash 'source' command


On Fri, 25 Jul 2003 9:37am +0300, Denis Vlasenko wrote:

> will happily include file.sh from current dir.
> In ash, it won't, you'll need to . ./file.sh
>
> I dunno who's right in a standards sense,
> but I think ash should mimic bash since bash
> is used on majority of Linux system.

Hi Denis,

``RATIONALE

Some older implementations searched the current directory for the
file, even if the value of PATH disallowed it. This behavior was omitted
from this volume of IEEE Std 1003.1-2001 due to concerns about introducing
the susceptibility to trojan horses that the user might be trying to avoid
by leaving dot out of PATH.'' --The Open Group Base Specifications Issue 6

You have to append a `current' dot to your $PATH environment,
~ $ PATH="$PATH:." && echo $PATH && . test.sh
/sbin:/usr/sbin:/bin:/usr/bin:.
local

--
Felipe Kellermann


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise