pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Add pam-pwauth_suid dependency to xlockmore?



Can a dependency on "security/pam-pwauth_suid" be added to "x11/xlockmore"
when the "pam" option is enabled, similar to what was done for
"x11/xscreensaver"?  Right now, that only exists in "xlockmore/MESSAGE".
When cleaning up packages, its possible to nuke "pam-pwauth_suid" out from
under "xlockmore" because there is no direct dependency.

Likewise, make the special permissions part of the non-pam case rather
than global?

My naive hack which seems to work for me:

+Index: x11/xlockmore/Makefile.common
+===================================================================
+RCS file: /cvsroot/pkgsrc/x11/xlockmore/Makefile.common,v
+retrieving revision 1.81
+diff -u -p -r1.81 Makefile.common
+--- x11/xlockmore/Makefile.common	26 Jan 2020 17:32:28 -0000	1.81
++++ x11/xlockmore/Makefile.common	20 Mar 2021 13:28:15 -0000
+@@ -75,19 +75,23 @@ CONFIGURE_ARGS+=	--disable-allow-root
+ .if !empty(PKG_OPTIONS:Mpam)
+ .  include "../../mk/pam.buildlink3.mk"
+ CONFIGURE_ARGS+=	--enable-pam --enable-bad-pam
++.  if ${OPSYS} == "NetBSD"
++# needed to read shadow passwords
++DEPENDS+=       pam-pwauth_suid-[0-9]*:../../security/pam-pwauth_suid
++.  endif
+ .else
+ CONFIGURE_ARGS+=	--disable-pam
+-.endif
+ 
+ #
+ # Special permissions of bin/xlock if any.
+ #
+-.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD" || \
+-    ${OPSYS} == "DragonFly" || ${OPSYS} == "SunOS"
++.  if ${OPSYS} == "FreeBSD" || ${OPSYS} == "NetBSD" || \
++      ${OPSYS} == "OpenBSD" || ${OPSYS} == "DragonFly" || ${OPSYS} == "SunOS"
+ SPECIAL_PERMS+=	bin/xlock ${SETUID_ROOT_PERMS}
+-.elif ${OPSYS} == "Linux"
++.  elif ${OPSYS} == "Linux"
+ # setgid shadow should be enough for modern Linux
+ SPECIAL_PERMS+=	bin/xlock ${REAL_ROOT_USER} shadow 2511
++.  endif
+ .endif
+ 
+ EGDIR=			${PREFIX}/share/examples/xlock


-- 
|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSD            FreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645


Home | Main Index | Thread Index | Old Index