summaryrefslogtreecommitdiffstats
path: root/desktop/i3lock/i3lock.SlackBuild
diff options
context:
space:
mode:
author mid-kid <esteve.varela@gmail.com>2018-01-07 22:43:25 +0700
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2018-01-10 23:55:49 +0700
commit79a4295d30e0c6ac9484c96ebedbdddfde24ea40 (patch)
treebdcf7fd9c0d6f31176c6fb1fb5e1b3b32b9ceca1 /desktop/i3lock/i3lock.SlackBuild
parent112800172b610357a601681d0dac65f8f844012c (diff)
downloadslackbuilds-79a4295d30e0c6ac9484c96ebedbdddfde24ea40.tar.gz
slackbuilds-79a4295d30e0c6ac9484c96ebedbdddfde24ea40.tar.xz
desktop/i3lock: Updated for version 2.10.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'desktop/i3lock/i3lock.SlackBuild')
-rw-r--r--desktop/i3lock/i3lock.SlackBuild14
1 files changed, 9 insertions, 5 deletions
diff --git a/desktop/i3lock/i3lock.SlackBuild b/desktop/i3lock/i3lock.SlackBuild
index 5fa35477e6..9993dee116 100644
--- a/desktop/i3lock/i3lock.SlackBuild
+++ b/desktop/i3lock/i3lock.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=i3lock
-VERSION=${VERSION:-2.9.1}
+VERSION=${VERSION:-2.10}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -71,15 +71,19 @@ find -L . \
# This patch removes all the PAM-related code,
# and checks the password against shadow instead.
-patch -p0 -i $CWD/i3lock-2.9.1-no-pam.patch
+patch -p0 -i $CWD/i3lock-2.10-no-pam.patch
make install DESTDIR=$PKG
# i3lock needs setuid to make sure it isn't killed by the kernel and to read shadow.
# Don't worry, the privileges are dropped really soon after starting
-# and everything else runs as your user.
-chown root:shadow $PKG/usr/bin/i3lock
-chmod 4755 $PKG/usr/bin/i3lock
+# and everything else runs without privileges.
+chown 0.0 $PKG/usr/bin/i3lock
+chmod 4751 $PKG/usr/bin/i3lock
+# We need setuid to set the out of memory score, and drop permissions once done.
+# This makes the program's init slightly more insecure, since we'd only need
+# setgid to change the group to shadow to read the password, otherwise.
+# In fact, both Slackware's xlock and xscreensaver use (root.shadow 2751) as permissions.
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true