ports/122724: [PATCH] security/pwauth: make MIN_UNIX_UID configurable
Scott Mitchell
rsm at FreeBSD.org
Sun Apr 13 14:50:02 UTC 2008
>Number: 122724
>Category: ports
>Synopsis: [PATCH] security/pwauth: make MIN_UNIX_UID configurable
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Apr 13 14:50:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Scott Mitchell
>Release: FreeBSD 7.0-RELEASE i386
>Organization:
>Environment:
System: FreeBSD tuatara.fishballoon.org 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008 root at logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
>Description:
The security/pwauth port uses the MIN_UNIX_UID macro to restrict the range of
UIDs it will authenticate - this defaults to 500 but is changed to 1000 by the
port. The port Makefile's post-patch action looks like it was intended to
allow this value to be configurable, but as written it doesn't work. The
attached patch allows MIN_UNIX_UID to be set from the MINUID make variable,
still with a default of 1000.
>How-To-Repeat:
>Fix:
diff -cr pwauth.orig/Makefile pwauth/Makefile
*** pwauth.orig/Makefile 2008-04-13 15:12:44.000000000 +0100
--- pwauth/Makefile 2008-04-13 15:15:21.000000000 +0100
***************
*** 21,30 ****
.include <bsd.port.pre.mk>
WWWUID!= ${ID} -u ${WWWOWN}
post-patch:
@${REINPLACE_CMD} "s/%%UIDS%%/${WWWUID}/ ; \
! s/%%MINUID%%/1000/" ${WRKSRC}/config.h
do-install:
-@${MKDIR} -p ${PREFIX}/bin
--- 21,31 ----
.include <bsd.port.pre.mk>
WWWUID!= ${ID} -u ${WWWOWN}
+ MINUID?= 1000
post-patch:
@${REINPLACE_CMD} "s/%%UIDS%%/${WWWUID}/ ; \
! s/%%MINUID%%/${MINUID}/" ${WRKSRC}/config.h
do-install:
-@${MKDIR} -p ${PREFIX}/bin
diff -cr pwauth.orig/files/patch-config.c pwauth/files/patch-config.c
*** pwauth.orig/files/patch-config.c 2008-04-13 15:13:21.000000000 +0100
--- pwauth/files/patch-config.c 2008-04-13 15:14:19.000000000 +0100
***************
*** 39,45 ****
*/
-#define MIN_UNIX_UID 500 /**/
! +#define MIN_UNIX_UID 1000 /**/
/* If IGNORE_CASE is defined, the login given is checked in two different
--- 39,45 ----
*/
-#define MIN_UNIX_UID 500 /**/
! +#define MIN_UNIX_UID %%MINUID%% /**/
/* If IGNORE_CASE is defined, the login given is checked in two different
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list