summaryrefslogtreecommitdiff
path: root/source/xap/xscreensaver
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2020-02-06 01:59:35 +0000
committerEric Hameleers <alien@slackware.com>2020-02-06 08:59:47 +0100
commit194ec853e8f20fd32d5a91eec74ff77383093f4e (patch)
tree44c5392ff2bffceadf4c0b62e675c4d35744100c /source/xap/xscreensaver
parentbc237eb78dd4cf07fb2b080666bf32e46bc7ba9a (diff)
downloadcurrent-194ec853e8f20fd32d5a91eec74ff77383093f4e.tar.gz
Thu Feb 6 01:59:35 UTC 202020200206015935
a/hwdata-0.332-noarch-1.txz: Upgraded. a/kernel-firmware-20200204_b791e15-noarch-1.txz: Upgraded. a/kernel-generic-5.4.18-x86_64-1.txz: Upgraded. a/kernel-huge-5.4.18-x86_64-1.txz: Upgraded. a/kernel-modules-5.4.18-x86_64-1.txz: Upgraded. d/cmake-3.16.4-x86_64-1.txz: Upgraded. d/icecream-1.3.1-x86_64-1.txz: Upgraded. d/kernel-headers-5.4.18-x86-1.txz: Upgraded. k/kernel-source-5.4.18-noarch-1.txz: Upgraded. xap/xlockmore-5.62-x86_64-1.txz: Upgraded. isolinux/initrd.img: Rebuilt. kernels/*: Upgraded. usb-and-pxe-installers/usbboot.img: Rebuilt.
Diffstat (limited to 'source/xap/xscreensaver')
-rw-r--r--source/xap/xscreensaver/doinst.sh15
-rwxr-xr-xsource/xap/xscreensaver/xscreensaver.SlackBuild35
-rw-r--r--source/xap/xscreensaver/xscreensaver.pam3
3 files changed, 44 insertions, 9 deletions
diff --git a/source/xap/xscreensaver/doinst.sh b/source/xap/xscreensaver/doinst.sh
new file mode 100644
index 00000000..f2744d09
--- /dev/null
+++ b/source/xap/xscreensaver/doinst.sh
@@ -0,0 +1,15 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/pam.d/xscreensaver.new
+
diff --git a/source/xap/xscreensaver/xscreensaver.SlackBuild b/source/xap/xscreensaver/xscreensaver.SlackBuild
index 5ecaa8e6..cb9c10cd 100755
--- a/source/xap/xscreensaver/xscreensaver.SlackBuild
+++ b/source/xap/xscreensaver/xscreensaver.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2008, 2009, 2010, 2012, 2013, 2014, 2016, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2012, 2013, 2014, 2016, 2018, 2019, 2020 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -71,9 +71,16 @@ rm -rf xscreensaver-$VERSION
tar xvf $CWD/xscreensaver-$VERSION.tar.?z || exit 1
cd xscreensaver-$VERSION
-# Allow xscreensaver to work setgid shadow. I'd rather avoid requiring
-# setuid root on this if at all possible...
-zcat $CWD/xscreensaver.setuid.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+if [ -L /lib${LIBDIRSUFFIX}/libpam.so.? ]; then
+ USE_PAM="--with-pam"
+ unset USE_SHADOW
+else
+ # Allow xscreensaver to work setgid shadow. I'd rather avoid requiring
+ # setuid root on this if at all possible...
+ zcat $CWD/xscreensaver.setuid.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+ unset USE_PAM
+ USE_SHADOW="--with-shadow"
+fi
# Add support for the electricsheep distributed screensaver:
zcat $CWD/xscreensaver.electricsheep.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
@@ -100,7 +107,9 @@ CXXFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--with-x-app-defaults=/etc/X11/app-defaults \
--with-text-file=/usr/doc/netdate/COPYRIGHT \
- --with-shadow \
+ $USE_SHADOW \
+ $USE_PAM \
+ --without-kerberos \
--with-jpeg \
--with-gl \
--build=$ARCH-slackware-linux || exit 1
@@ -109,9 +118,18 @@ CXXFLAGS="$SLKCFLAGS" \
make $NUMJOBS || make || exit 1
make install_prefix=$PKG install-strip || exit 1
-# Needed for password unlock:
-chown root:shadow $PKG/usr/bin/xscreensaver
-chmod 2751 $PKG/usr/bin/xscreensaver
+if [ -z $USE_PAM ]; then
+ # Needed for password unlock:
+ chown root:shadow $PKG/usr/bin/xscreensaver
+ chmod 2751 $PKG/usr/bin/xscreensaver
+else
+ # No special perms needed with PAM:
+ chmod 755 $PKG/usr/bin/xscreensaver
+ mkdir -p $PKG/etc/pam.d
+ cat $CWD/xscreensaver.pam > $PKG/etc/pam.d/xscreensaver.new
+ mkdir -p $PKG/install
+ zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+fi
# This is needed for the menus:
mkdir -p $PKG/usr/share/pixmaps
@@ -147,4 +165,3 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $TMP/xscreensaver-$VERSION-$ARCH-$BUILD.txz
-
diff --git a/source/xap/xscreensaver/xscreensaver.pam b/source/xap/xscreensaver/xscreensaver.pam
new file mode 100644
index 00000000..86f37b29
--- /dev/null
+++ b/source/xap/xscreensaver/xscreensaver.pam
@@ -0,0 +1,3 @@
+#%PAM-1.0
+
+ auth include system-auth