From owner-freebsd-bugs Tue Sep 2 23:24:14 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id XAA21689 for bugs-outgoing; Tue, 2 Sep 1997 23:24:14 -0700 (PDT) Received: from awfulhak.demon.co.uk (awfulhak.demon.co.uk [158.152.17.1]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id XAA21678 for ; Tue, 2 Sep 1997 23:24:07 -0700 (PDT) Received: from gate.lan.awfulhak.org (localhost [127.0.0.1]) by awfulhak.demon.co.uk (8.8.5/8.8.5) with ESMTP id HAA11081; Wed, 3 Sep 1997 07:21:30 +0100 (BST) Message-Id: <199709030621.HAA11081@awfulhak.demon.co.uk> X-Mailer: exmh version 2.0zeta 7/24/97 To: Bruce Evans cc: bugs@FreeBSD.ORG Subject: Re: bogus and inconsistent default $PATH's In-reply-to: Your message of "Wed, 03 Sep 1997 14:02:24 +1000." <199709030402.OAA28504@godzilla.zeta.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 03 Sep 1997 07:21:30 +0100 From: Brian Somers 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. IMHO, they should all use login_getpath(..., "path", ...). This function should default to whatever (/bin:/usr/bin or /usr/bin:/bin). > Bruce -- Brian , Don't _EVER_ lose your sense of humour....