Date: Wed, 3 Sep 1997 14:02:24 +1000 From: Bruce Evans <bde@zeta.org.au> To: bugs@freebsd.org Subject: bogus and inconsistent default $PATH's Message-ID: <199709030402.OAA28504@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
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. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709030402.OAA28504>