summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2018-01-27 10:04:11 (GMT)
committerHideki Yamane <henrich@debian.org>2018-03-17 15:32:15 (GMT)
commit15b20e644b407602288402f97fc348b00921cc54 (patch)
tree57e1dd8cee36082c1c3dc1bdeb9f6deaffc865bf /functions
parent528dc1d3e01433c769d15f5dcea4af99b3fd4629 (diff)
downloaddebootstrap-15b20e644b407602288402f97fc348b00921cc54.zip
debootstrap-15b20e644b407602288402f97fc348b00921cc54.tar.gz
debootstrap-15b20e644b407602288402f97fc348b00921cc54.tar.bz2
Don't let host PATH leak into the target commandsHEADmaster
This fixes debootstrap on Fedora host, with unified /usr and PATH lacking /bin and /sbin.
Diffstat (limited to 'functions')
-rw-r--r--functions4
1 files changed, 2 insertions, 2 deletions
diff --git a/functions b/functions
index 43969ee..b780488 100644
--- a/functions
+++ b/functions
@@ -976,7 +976,7 @@ extract () { (
); }
in_target_nofail () {
- if ! $CHROOT_CMD "$@" 2>/dev/null; then
+ if ! PATH=/sbin:/usr/sbin:/bin:/usr/bin $CHROOT_CMD "$@" 2>/dev/null; then
true
fi
return 0
@@ -987,7 +987,7 @@ in_target_failmsg () {
local msg="$2"
local arg="$3"
shift; shift; shift
- if ! $CHROOT_CMD "$@"; then
+ if ! PATH=/sbin:/usr/sbin:/bin:/usr/bin $CHROOT_CMD "$@"; then
warning "$code" "$msg" "$arg"
# Try to point user at actual failing package.
msg="See %s for details"