From 9cac4dd130637fa2c1f1a64bf3c9d2509284e6dd Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Wed, 4 Oct 2017 17:17:40 -0500 Subject: Drop support for ROOTPATH The following is taken from /etc/profile: > Set up PATH depending on whether we're root or a normal user. > There's no real reason to exclude sbin paths from the normal user, > but it can make tab-completion easier when they aren't in the > user's PATH to pollute the executable namespace. This seems like a minor inconvenience, and excluding sbin paths for the normal user can cause bigger issues which will offset this inconvenience. commit ac52b58e7a8a7f8085de9f806645881740b22c5e Author: William Hubbs Date: Wed Oct 4 17:12:33 2017 -0500 Drop support for ROOTPATH The following is taken from /etc/profile: This seems like a minor inconvenience, and not having *sbin in the path can cause bigger compatibility issues which offset this inconvenience. diff --git a/etc/env.d/50baselayout b/etc/env.d/50baselayout index e8662e0e..b10a2c4d 100644 --- a/etc/env.d/50baselayout +++ b/etc/env.d/50baselayout @@ -1,8 +1,7 @@ # /etc/env.d/50baselayout # Do not edit this file -PATH="/usr/local/bin:/usr/bin:/bin:/opt/bin" -ROOTPATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin" +PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin" MANPATH="/usr/local/share/man:/usr/share/man" INFOPATH="/usr/share/info" CONFIG_PROTECT_MASK="/etc/gentoo-release" diff --git a/etc/profile b/etc/profile index 8e92e824..4579bd17 100644 --- a/etc/profile +++ b/etc/profile @@ -18,16 +18,6 @@ export PAGER=${PAGER:-/usr/bin/less} # 077 would be more secure, but 022 is generally quite realistic umask 022 -# Set up PATH depending on whether we're root or a normal user. -# There's no real reason to exclude sbin paths from the normal user, -# but it can make tab-completion easier when they aren't in the -# user's PATH to pollute the executable namespace. -if [ "${EUID-}" = "0" ] || [ "${USER-}" = "root" ] ; then - PATH="${ROOTPATH}" -fi -export PATH -unset ROOTPATH - # process *.sh files in /etc/profiled.d for sh in /etc/profile.d/*.sh ; do [ -r "$sh" ] && . "$sh" --- etc/env.d/50baselayout | 3 +-- etc/profile | 10 ---------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/etc/env.d/50baselayout b/etc/env.d/50baselayout index e8662e0e..b10a2c4d 100644 --- a/etc/env.d/50baselayout +++ b/etc/env.d/50baselayout @@ -1,8 +1,7 @@ # /etc/env.d/50baselayout # Do not edit this file -PATH="/usr/local/bin:/usr/bin:/bin:/opt/bin" -ROOTPATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin" +PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin" MANPATH="/usr/local/share/man:/usr/share/man" INFOPATH="/usr/share/info" CONFIG_PROTECT_MASK="/etc/gentoo-release" diff --git a/etc/profile b/etc/profile index 8e92e824..4579bd17 100644 --- a/etc/profile +++ b/etc/profile @@ -18,16 +18,6 @@ export PAGER=${PAGER:-/usr/bin/less} # 077 would be more secure, but 022 is generally quite realistic umask 022 -# Set up PATH depending on whether we're root or a normal user. -# There's no real reason to exclude sbin paths from the normal user, -# but it can make tab-completion easier when they aren't in the -# user's PATH to pollute the executable namespace. -if [ "${EUID-}" = "0" ] || [ "${USER-}" = "root" ] ; then - PATH="${ROOTPATH}" -fi -export PATH -unset ROOTPATH - # process *.sh files in /etc/profiled.d for sh in /etc/profile.d/*.sh ; do [ -r "$sh" ] && . "$sh" -- cgit v1.2.3