summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2017-10-04 17:17:40 -0500
committerWilliam Hubbs <williamh@gentoo.org>2017-10-04 17:17:40 -0500
commit9cac4dd130637fa2c1f1a64bf3c9d2509284e6dd (patch)
tree600925182e785949f7767b881a1c5c621d250978
parentprocess files in /etc/profile.d before /etc/bash/bashrc for consistency (diff)
downloadbaselayout-9cac4dd130637fa2c1f1a64bf3c9d2509284e6dd.tar.gz
baselayout-9cac4dd130637fa2c1f1a64bf3c9d2509284e6dd.tar.bz2
baselayout-9cac4dd130637fa2c1f1a64bf3c9d2509284e6dd.zip
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 <williamh@gentoo.org> 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"
-rw-r--r--etc/env.d/50baselayout3
-rw-r--r--etc/profile10
2 files changed, 1 insertions, 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"