Date: Mon, 17 Jan 2005 19:53:53 +0300 From: "Yuri Y.Bushmelev" <jay-dev@simcom.ru> To: FreeBSD-gnats-submit@FreeBSD.org Cc: jay-dev@simcom.ru Subject: ports/76358: xlockmore PAM support Message-ID: <E1Cqa8X-0007Hl-Ql@xeon.simcom.ru> Resent-Message-ID: <200501171700.j0HH0eKQ020974@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 76358 >Category: ports >Synopsis: xlockmore PAM support >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Mon Jan 17 17:00:40 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Yuri Y. Bushmelev >Release: FreeBSD 5.3-RELEASE-p3 i386 >Organization: SimCom LLC, ISP "Simbirsk Communications" >Environment: System: FreeBSD xeon.simcom.ru 5.3-RELEASE-p3 FreeBSD 5.3-RELEASE-p3 #0: Wed Jan 5 19:06:56 MSK 2005 jay@xeon.simcom.ru:/local/obj/local/src/sys/XEON i386 xlockmore-5.14.1, xorg-6.8.1 >Description: xlockmore-5.14.1 port don't have option to enable PAM support with make args (e.g. make WITH_PAM=yes). Here is patch to add it. Also added option for low CPU usage modes (WITH_NICE_ONLY). >How-To-Repeat: N/A >Fix: --- xlockmore-pam.diff begins here --- diff -ruN /usr/ports/x11/xlockmore/Makefile xlockmore/Makefile --- /usr/ports/x11/xlockmore/Makefile Mon Jan 17 15:33:26 2005 +++ xlockmore/Makefile Mon Jan 17 19:43:00 2005 @@ -68,9 +68,20 @@ CONFIGURE_ARGS+= --disable-allow-root .endif -.if ${X_WINDOW_SYSTEM:L} != xfree86-3 +.if defined(WITH_PAM) +CONFIGURE_ARGS+= --enable-pam +.endif + +.if defined(WITH_NICE_ONLY) +CONFIGURE_ARGS+= --enable-nice-only +.endif + post-configure: +.if ${X_WINDOW_SYSTEM:L} != xfree86-3 ${REINPLACE_CMD} -e 's/-lXdpms//g' ${WRKSRC}/modes/Makefile +.endif +.if defined(WITH_PAM) + ${REINPLACE_CMD} -e 's|/\* #define BAD_PAM \*/|#define BAD_PAM|g' ${WRKSRC}/config.h .endif .include <bsd.port.post.mk> diff -ruN /usr/ports/x11/xlockmore/files/patch-configure xlockmore/files/patch-configure --- /usr/ports/x11/xlockmore/files/patch-configure Thu Jan 1 03:00:00 1970 +++ xlockmore/files/patch-configure Mon Jan 17 16:15:54 2005 @@ -0,0 +1,11 @@ +--- configure.orig Mon Jan 17 16:14:57 2005 ++++ configure Mon Jan 17 16:15:15 2005 +@@ -12380,7 +12380,7 @@ + #define USE_PAM 1 + _ACEOF + +- XLOCKLIBS="${XLOCKLIBS} -lpam -ldl" ++ XLOCKLIBS="${XLOCKLIBS} -lpam" + fi + fi + diff -ruN /usr/ports/x11/xlockmore/files/patch-passwd.c xlockmore/files/patch-passwd.c --- /usr/ports/x11/xlockmore/files/patch-passwd.c Thu Jan 1 03:00:00 1970 +++ xlockmore/files/patch-passwd.c Mon Jan 17 19:01:16 2005 @@ -0,0 +1,12 @@ +--- xlock/passwd.c.orig Mon Jan 17 18:19:26 2005 ++++ xlock/passwd.c Mon Jan 17 18:20:26 2005 +@@ -1192,8 +1192,7 @@ + pam_error = pam_authenticate(pamh, 0); + if (pam_error != PAM_SUCCESS) { + if (!allowroot) { +- pam_end(pamh, 0); +- return False; ++ PAM_BAIL; + } + + /* Try as root; bail if no success there either */ diff -ruN /usr/ports/x11/xlockmore/files/patch-xlock.c xlockmore/files/patch-xlock.c --- /usr/ports/x11/xlockmore/files/patch-xlock.c Thu Jan 1 03:00:00 1970 +++ xlockmore/files/patch-xlock.c Mon Jan 17 19:01:48 2005 @@ -0,0 +1,15 @@ +--- xlock/xlock.c.orig Mon Jan 17 18:19:37 2005 ++++ xlock/xlock.c Mon Jan 17 18:20:10 2005 +@@ -3260,10 +3260,12 @@ + #endif + #endif + ++#ifndef BAD_PAM + #ifdef USE_VTLOCK + if (!vtlock) + #endif + (void) setuid(ruid); ++#endif + + #if 0 + /* synchronize -- so I am aware of errors immediately */ --- xlockmore-pam.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1Cqa8X-0007Hl-Ql>