File: 2001_fix_setuid_slock.patch

package info (click to toggle)
suckless-tools 40-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 700 kB
  • sloc: ansic: 2,512; makefile: 465; sh: 104
file content (24 lines) | stat: -rw-r--r-- 864 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Description: Remove setsid bit on slock binary
 Upstream Makefile was installing slock with setsid bit
 on. This patch make slock to belong shadow group and sets
 sgid bit
Author: Michael Stummvoll <michael@stummi.org>, Vasudev Kamath <kamathvasudev@gmail.com>
Last-Update: 2012-07-25
--- a/slock/Makefile
+++ b/slock/Makefile
@@ -38,10 +38,11 @@
 
 install: all
 	@echo installing executable file to ${DESTDIR}${PREFIX}/bin
-	@mkdir -p ${DESTDIR}${PREFIX}/bin
-	@cp -f slock ${DESTDIR}${PREFIX}/bin
-	@chmod 755 ${DESTDIR}${PREFIX}/bin/slock
-	@chmod u+s ${DESTDIR}${PREFIX}/bin/slock
+	mkdir -p ${DESTDIR}${PREFIX}/bin
+	cp -f slock ${DESTDIR}${PREFIX}/bin
+	chmod 755 ${DESTDIR}${PREFIX}/bin/slock
+	chgrp shadow ${DESTDIR}${PREFIX}/bin/slock
+	chmod g+s ${DESTDIR}${PREFIX}/bin/slock
 
 uninstall:
 	@echo removing executable file from ${DESTDIR}${PREFIX}/bin