Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

why does _PATH_STDPATH contain the current directory?

0 views
Skip to first unread message

Jilles Tjoelker

unread,
Dec 23, 2009, 5:16:03 PM12/23/09
to freebsd...@freebsd.org
/usr/include/paths.h has:
/* All standard utilities path. */
#define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin:"

The current directory appears to have been added accidentally years ago.
Can I go ahead and take it out (the colon)?

The paths for rescue already do not have the current directory.

The main use for _PATH_STDPATH is to find all standard utilities, such
as for the POSIX-specified confstr(_CS_PATH), 'getconf PATH' and
'command -p'. Some utilities also use it instead of _PATH_DEFPATH for
root, but these values tend to be overridden by /etc/login.conf and/or
shell startup files.

--
Jilles Tjoelker
_______________________________________________
freebsd...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hacke...@freebsd.org"

John Baldwin

unread,
Dec 24, 2009, 8:01:04 AM12/24/09
to freebsd...@freebsd.org, Jilles Tjoelker
On Wednesday 23 December 2009 5:15:24 pm Jilles Tjoelker wrote:
> /usr/include/paths.h has:
> /* All standard utilities path. */
> #define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin:"
>
> The current directory appears to have been added accidentally years ago.
> Can I go ahead and take it out (the colon)?
>
> The paths for rescue already do not have the current directory.
>
> The main use for _PATH_STDPATH is to find all standard utilities, such
> as for the POSIX-specified confstr(_CS_PATH), 'getconf PATH' and
> 'command -p'. Some utilities also use it instead of _PATH_DEFPATH for
> root, but these values tend to be overridden by /etc/login.conf and/or
> shell startup files.

I vote to fix it. That's an old bug. :)

--
John Baldwin

0 new messages