[oe] RFC: [PATCH] /etc/profile: stricter root PATH - require absolute pathname for bins in cwd

Phil Blundell philb at gnu.org
Mon Jun 22 18:09:05 UTC 2009


On Mon, 2009-06-22 at 13:44 -0400, Denys Dmytriyenko wrote:
> Having current directory (either '.' or empty string) in PATH is considered
> dangerous for root.

Agreed, having an empty element in there is a bad idea.  I don't think
any mainstream distribution does that.

FWIW, the equivalent from Debian's /etc/profile is:

 if [ "`id -u`" -eq 0 ]; then
   PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
 else
  PATH="/usr/local/bin:/usr/bin:/bin:/usr/games"
 fi

p.






More information about the Openembedded-devel mailing list