summaryrefslogtreecommitdiffstats
path: root/source/a/shadow/shadow.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/shadow/shadow.SlackBuild')
-rwxr-xr-xsource/a/shadow/shadow.SlackBuild33
1 files changed, 26 insertions, 7 deletions
diff --git a/source/a/shadow/shadow.SlackBuild b/source/a/shadow/shadow.SlackBuild
index 633d38514..992944e8f 100755
--- a/source/a/shadow/shadow.SlackBuild
+++ b/source/a/shadow/shadow.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2005-2014 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2005-2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,28 +20,37 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PKGNAM=shadow
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-4}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
esac
fi
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
NUMJOBS=${NUMJOBS:--j6}
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-shadow
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
@@ -69,10 +78,20 @@ done
# breakage:
zcat $CWD/shadow.CVE-2005-4890.relax.diff.gz | patch -p1 --verbose || exit 1
+# Patch a race condition that allows a user to kill processes that they don't
+# own. Note that the bug requires that shadow is using PAM, which is not yet
+# the case on Slackware. So we're unaffected, but patching this anyway in
+# -current, because you never know...
+zcat $CWD/shadow.CVE-2017-2616.diff.gz | patch -p1 --verbose || exit 1
+
# Re-run automake because of r3299 patch to man/ru/Makefile.am:
# (not used because it doesn't work... above patch does the intended fix)
#automake -f
+# Even if gethostname() returns the FQDN (long hostname), just display the
+# short version up to the first '.' on the login prompt:
+zcat $CWD/shadow.login.display.short.hostname.diff.gz | patch -p1 --verbose || exit 1
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \