Subject: Re: Shell behaviour regarding PATH
To: None <tech-userlevel@netbsd.org>
From: Greg A. Woods <woods@most.weird.com>
List: tech-userlevel
Date: 02/10/2000 10:22:00
[ On Thursday, February 10, 2000 at 08:19:23 (+0200), Lucio De Re wrote: ]
> Subject: Re: Shell behaviour regarding PATH
>
> Currently execvp() makes an exception on "/" within the pathname string.
> My proposal is merely to use "/", "./" and "../" _as_prefixes_ (as all
> security-aware programs already do) as the basis to apply the exception.

Execvp() will have to stay that way unless you're willing to first lobby
the ANSI, IEEE, ISO, and x/Open groups responsible for unix standards!  ;-)

> It is subtle and it is arbitrary, but I believe my version adds
> flexibility and consistency.

You might be right (I like Plan 9 too and this feature of it only adds
to my appreciation of it), but you're 100% against the tide of tradition
in unix that's now chiseled in widely accepted standards.

If you want to keep things simple then please try to be very strict in
Unix about only ever and only ever performing the very simple test now
used on argv[0] to turn on $PATH searching.  The more widely this is
done in all tools that have search path concepts (i.e. not just shells)
the easier a time all users will have of making the right assumptions
about what's happening.

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>      <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>