From owner-freebsd-bugs Tue Sep 2 21:03:12 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id VAA14801 for bugs-outgoing; Tue, 2 Sep 1997 21:03:12 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id VAA14793 for ; Tue, 2 Sep 1997 21:03:05 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id OAA28504 for bugs@freebsd.org; Wed, 3 Sep 1997 14:02:24 +1000 Date: Wed, 3 Sep 1997 14:02:24 +1000 From: Bruce Evans Message-Id: <199709030402.OAA28504@godzilla.zeta.org.au> To: bugs@freebsd.org Subject: bogus and inconsistent default $PATH's Sender: owner-freebsd-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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 ). 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