summaryrefslogtreecommitdiff
path: root/source/a/util-linux
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/util-linux')
-rw-r--r--source/a/util-linux/doinst.sh3
-rw-r--r--source/a/util-linux/su.default3
-rwxr-xr-xsource/a/util-linux/util-linux.SlackBuild7
3 files changed, 12 insertions, 1 deletions
diff --git a/source/a/util-linux/doinst.sh b/source/a/util-linux/doinst.sh
index f3010148..da24e743 100644
--- a/source/a/util-linux/doinst.sh
+++ b/source/a/util-linux/doinst.sh
@@ -22,3 +22,6 @@ config etc/rc.d/rc.serial.new
config etc/rc.d/rc.setterm.new
config etc/serial.conf.new
+if [ -r etc/default/su.new ]; then
+ config etc/default/su.new
+fi
diff --git a/source/a/util-linux/su.default b/source/a/util-linux/su.default
new file mode 100644
index 00000000..73fb50a0
--- /dev/null
+++ b/source/a/util-linux/su.default
@@ -0,0 +1,3 @@
+# Ensure that ENV_SUPATH from /etc/login.defs is used for the $PATH when
+# 'su' is used. Otherwise /sbin paths will be missing unless 'su -' is used.
+ALWAYS_SET_PATH yes
diff --git a/source/a/util-linux/util-linux.SlackBuild b/source/a/util-linux/util-linux.SlackBuild
index 662eb75c..1d101d46 100755
--- a/source/a/util-linux/util-linux.SlackBuild
+++ b/source/a/util-linux/util-linux.SlackBuild
@@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=util-linux
VERSION=${VERSION:-$(echo util-linux*.tar.xz | cut -d - -f 3 | rev | cut -f 3- -d . | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
ADJTIMEXVERS=1.29
SETSERIALVERS=2.17
@@ -85,6 +85,11 @@ find . \
# Choose correct options depending on whether PAM is installed:
if [ -L /lib${LIBDIRSUFFIX}/libpam.so.? ]; then
LOGIN_OPTIONS=""
+ # Add su default file to ensure using ENV_SUPATH with 'su':
+ mkdir -p $PKG/etc/default
+ cp -a $CWD/su.default $PKG/etc/default/su.new
+ chown root:root $PKG/etc/default/su.new
+ chmod 644 $PKG/etc/default/su.new
else
LOGIN_OPTIONS="--disable-login"
fi