Date: Wed, 03 Sep 1997 07:21:30 +0100 From: Brian Somers <brian@awfulhak.org> To: Bruce Evans <bde@zeta.org.au> Cc: bugs@FreeBSD.ORG Subject: Re: bogus and inconsistent default $PATH's Message-ID: <199709030621.HAA11081@awfulhak.demon.co.uk> In-Reply-To: Your message of "Wed, 03 Sep 1997 14:02:24 %2B1000." <199709030402.OAA28504@godzilla.zeta.org.au>
index | next in thread | previous in thread | raw e-mail
> exec.3 claims that the default $PATH for execlp() and execvp()
> was changed from ":/bin:/usr/bin" to "/bin:/usr/bin:" to enhance
> system security. It was actually changed to "/usr/bin:/bin"
> before FreeBSD-1.0 was released (see <paths.h>). Why was the
> order of /bin and /usr/bin reversed?
>
> /bin/sh doesn't actually use the default $PATH. It hard-codes
> "/bin:/usr/bin".
>
> /bin/csh doesn't actually use the default $PATH. It uses its
> own pathnames.h with macros for "/bin" and "/usr/bin" in it
> and builds up the path using the expanded macros.
>
> The default $PATH is set by login, so the [c]sh default is usually
> not used.
IMHO, they should all use login_getpath(..., "path", ...). This
function should default to whatever (/bin:/usr/bin or /usr/bin:/bin).
> Bruce
--
Brian <brian@awfulhak.org>, <brian@freebsd.org>
<http://www.awfulhak.org>
Don't _EVER_ lose your sense of humour....
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709030621.HAA11081>
