summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-03-29 20:50:59 +0200
committerDave Reisner <dreisner@archlinux.org>2012-04-02 00:29:55 +0200
commit954f8c363dbfe2472c9eeafa3aa1ff5d9f2af8ca (patch)
tree4b5f397744cd0270d78a8edcd9743462bac89e97
parent4511c1a56381d72947e311171e8acf0daf2bd2e6 (diff)
downloadmkinitcpio-954f8c363dbfe2472c9eeafa3aa1ff5d9f2af8ca.tar.gz
mkinitcpio-954f8c363dbfe2472c9eeafa3aa1ff5d9f2af8ca.tar.xz
mkinitcpio: hardcode a sane PATH
Avoid pulling insane apps from user added PATH elements. FS#29162 Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-xmkinitcpio6
1 files changed, 3 insertions, 3 deletions
diff --git a/mkinitcpio b/mkinitcpio
index b72557a..c743074 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -27,9 +27,9 @@ declare NC= BOLD= BLUE= GREEN= RED= YELLOW=
declare -i QUIET=1 SHOW_AUTOMODS=0 SAVELIST=0 COLOR=1
declare -a SKIPHOOKS ADDED_MODULES MODPATHS
-# Add /{,usr}/sbin to path
-# works around undetected problems like in #8448
-PATH=$PATH:/sbin:/usr/sbin
+# export a sane PATH
+export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
+
# Sanitize environment further
# GREP_OPTIONS="--color=always" will break everything
# CDPATH can affect cd and pushd