ports/73956: amanda-server port contains erroneous hardcoded username

Phil Homewood pdh at bne.snapgear.com
Mon Nov 15 02:30:26 UTC 2004


>Number:         73956
>Category:       ports
>Synopsis:       amanda-server port contains erroneous hardcoded username
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 15 02:30:25 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Phil Homewood
>Release:        FreeBSD 4.10-STABLE i386
>Organization:
>Environment:
System: FreeBSD dorfl.internal.moreton.com.au 4.10-STABLE FreeBSD 4.10-STABLE #1: Mon Aug 9 05:27:58 EST 2004 root at dorfl.internal.moreton.com.au:/usr/obj/usr/src/sys/DORFL i386


	
>Description:
	latest amanda-server port has a hardcoded reference to user
	operator and group operator, despite the fact that these
	are configurable.

>How-To-Repeat:
	
>Fix:

Index: misc/amanda-server/Makefile
===================================================================
RCS file: /cvs/FreeBSD/ports/misc/amanda-server/Makefile,v
retrieving revision 1.77
diff -u -r1.77 Makefile
--- misc/amanda-server/Makefile	9 Nov 2004 10:56:40 -0000	1.77
+++ misc/amanda-server/Makefile	15 Nov 2004 02:24:14 -0000
@@ -112,17 +112,11 @@
 CONFIGURE_ARGS+=	--with-config=${AMANDA_CONFIG}
 .endif
 
-.if defined (AMANDA_USER)
-CONFIGURE_ARGS+=	--with-user=${AMANDA_USER}
-.else
-CONFIGURE_ARGS+=	--with-user=operator
-.endif
+AMANDA_USER?=		operator
+AMANDA_GROUP?=		operator
 
-.if defined (AMANDA_GROUP)
+CONFIGURE_ARGS+=	--with-user=${AMANDA_USER}
 CONFIGURE_ARGS+=	--with-group=${AMANDA_GROUP}
-.else
-CONFIGURE_ARGS+=	--with-group=operator
-.endif
 
 .if defined (AMANDA_UDPPORTRANGE)
 CONFIGURE_ARGS+=	--with-udpportrange=${AMANDA_UDPPORTRANGE}
@@ -191,9 +185,9 @@
 		${WRKSRC}/example/disklist \
 		${PREFIX}/share/examples/amanda
 	${MKDIR} ${PREFIX}/var/amanda/gnutar-lists
-	${CHOWN} operator:operator ${PREFIX}/var/amanda/gnutar-lists
+	${CHOWN} ${AMANDA_USER}:${AMANDA_GROUP} ${PREFIX}/var/amanda/gnutar-lists
 	${TOUCH} /etc/amandates
-	${CHOWN} operator:operator /etc/amandates
+	${CHOWN} ${AMANDA_USER}:${AMANDA_GROUP} /etc/amandates
 
 .if defined (AMANDA_SERVER)
 CONFIGURE_ARGS+=	--with-index-server=${AMANDA_SERVER}
@@ -208,17 +202,11 @@
 CONFIGURE_ARGS+=	--with-gnutar-listdir=${AMANDA_GNUTAR_LISTDIR}
 .endif
 
-.if defined (AMANDA_USER)
-CONFIGURE_ARGS+=	--with-user=${AMANDA_USER}
-.else
-CONFIGURE_ARGS+=	--with-user=operator
-.endif
+AMANDA_USER?=		operator
+AMANDA_GROUP?=		operator
 
-.if defined (AMANDA_GROUP)
+CONFIGURE_ARGS+=	--with-user=${AMANDA_USER}
 CONFIGURE_ARGS+=	--with-group=${AMANDA_GROUP}
-.else
-CONFIGURE_ARGS+=	--with-group=operator
-.endif
 
 .if defined (AMANDA_UDPPORTRANGE)
 CONFIGURE_ARGS+=	--with-udpportrange=${AMANDA_UDPPORTRANGE}
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list