git: 93a3cca82fba - main - x11/xscreensaver: Drop custom PAM policy

From: Felix Palmen <zirias_at_FreeBSD.org>
Date: Wed, 26 Jul 2023 07:54:59 UTC
The branch main has been updated by zirias:

URL: https://cgit.FreeBSD.org/ports/commit/?id=93a3cca82fba79789e6942a84da81aec2802c44d

commit 93a3cca82fba79789e6942a84da81aec2802c44d
Author:     Felix Palmen <zirias@FreeBSD.org>
AuthorDate: 2023-07-13 18:00:55 +0000
Commit:     Felix Palmen <zirias@FreeBSD.org>
CommitDate: 2023-07-26 07:54:38 +0000

    x11/xscreensaver: Drop custom PAM policy
    
    Instead, symlink to the unix-selfauth policy now delivered with
    security/unix-selfauth-helper.
    
    Approved by:            x11 (manu)
    Differential Revision:  https://reviews.freebsd.org/D41174
---
 x11/xscreensaver/Makefile                  | 10 +++++-----
 x11/xscreensaver/files/xscreensaver.pam.in |  4 ----
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/x11/xscreensaver/Makefile b/x11/xscreensaver/Makefile
index 7f0ef0c45888..19da13ff158b 100644
--- a/x11/xscreensaver/Makefile
+++ b/x11/xscreensaver/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	xscreensaver
 DISTVERSION=	6.06
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	x11
 MASTER_SITES=	http://www.jwz.org/xscreensaver/
 
@@ -86,8 +86,7 @@ XSNOW_DESC=		Add extra port x11/xsnow
 XSNOW_RUN_DEPENDS=	xsnow:x11/xsnow
 
 SUB_FILES=	xscreensaver-blank.desktop xscreensaver-lock.desktop \
-		xscreensaver-start.desktop xscreensaver-stop.desktop \
-		xscreensaver.pam
+		xscreensaver-start.desktop xscreensaver-stop.desktop
 
 post-patch:
 	${REINPLACE_CMD} -e 's|/usr/X11R6|${LOCALBASE}|g' \
@@ -104,7 +103,8 @@ post-patch-NSFW-off:
 post-install:
 	${INSTALL_DATA} ${FILESDIR}/x*.xml ${STAGEDIR}${DATADIR}/config/
 	${INSTALL_DATA} ${WRKDIR}/*.desktop ${STAGEDIR}${PREFIX}/share/applications/
-	${RM} ${STAGEDIR}${PREFIX}/etc/pam.d/xscreensaver.pam
-	${INSTALL_DATA} ${WRKDIR}/xscreensaver.pam ${STAGEDIR}${PREFIX}/etc/pam.d/xscreensaver
+	${RM} ${STAGEDIR}${PREFIX}/etc/pam.d/xscreensaver
+	${LN} -s ${LOCALBASE}/etc/pam.d/unix-selfauth \
+		${STAGEDIR}${PREFIX}/etc/pam.d/xscreensaver
 
 .include <bsd.port.mk>
diff --git a/x11/xscreensaver/files/xscreensaver.pam.in b/x11/xscreensaver/files/xscreensaver.pam.in
deleted file mode 100644
index e1a420f35fb0..000000000000
--- a/x11/xscreensaver/files/xscreensaver.pam.in
+++ /dev/null
@@ -1,4 +0,0 @@
-auth		sufficient	pam_exec.so	return_prog_exit_status \
-		expose_authtok	%%LOCALBASE%%/libexec/unix-selfauth-helper
-auth		include		system
-account		include		system