ports/78715: [PATCH] mail/maildrop: Fix and Change spec of MAILDROP_SUID/MAILDROP_GUID options

KIMURA Yasuhiro yasu at utahime.org
Sat Mar 12 00:20:03 UTC 2005


>Number:         78715
>Category:       ports
>Synopsis:       [PATCH] mail/maildrop: Fix and Change spec of MAILDROP_SUID/MAILDROP_GUID options
>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:   Sat Mar 12 00:20:02 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     KIMURA Yasuhiro
>Release:        FreeBSD 4.11-RELEASE i386
>Organization:
>Environment:
System: FreeBSD xxxxxxxx 4.11-RELEASE FreeBSD 4.11-RELEASE #0: Wed Jan 26 08:33:31 JST 2005 xxxxxxxx i386


	
>Description:
	

	Maildrop was installed without suid/sgid bit even if
	MAILDROP_SUID/MAILDROP_SGID option is set. So fix it.
	And also change spec of these options so that suid/sgid bit
	is set only if these options are explicitly specified.

>How-To-Repeat:
	
>Fix:

	

--- patch-maildrop begins here ---
Index: Makefile
===================================================================
RCS file: /net/cvsup/cvsroot/ports/mail/maildrop/Makefile,v
retrieving revision 1.37
diff -u -r1.37 Makefile
--- Makefile	9 Mar 2005 15:36:55 -0000	1.37
+++ Makefile	11 Mar 2005 23:50:58 -0000
@@ -10,8 +10,6 @@
 # MAILDROP_SUID=<uid>,
 # MAILDROP_SGID=<gid>	Maildrop will be installed with suid permissions for
 #			MAILDROP_SUID, and sgid permissions for MAILDROP_SGID.
-#			If undefined, these values default to "root" and "mail"
-#			respectively, which should be suitable for most systems.
 # MAILDROP_TRUSTED_USERS=<user> Specify users allowed to use the -d option
 # NO_MAILWRAPPER=yes	If defined, let configure guess which sendmail binary
 #			to use
@@ -34,8 +32,6 @@
 CONFIGURE_ARGS=	--enable-syslog=1 \
 		--enable-use-flock=1 \
 		--with-etcdir="${PREFIX}/etc" \
-		--enable-maildrop-uid="${MAILDROP_SUID}" \
-		--enable-maildrop-gid="${MAILDROP_SGID}" \
 		--enable-maildirquota
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 CPPFLAGS+=	-I${LOCALBASE}/include
@@ -54,6 +50,14 @@
 CONFIGURE_ARGS+=	--without-db
 .endif
 
+.if defined(MAILDROP_SUID)
+CONFIGURE_ARGS+=	--enable-maildrop-uid="${MAILDROP_SUID}"
+.endif
+
+.if defined(MAILDROP_SGID)
+CONFIGURE_ARGS+=	--enable-maildrop-gid="${MAILDROP_SGID}"
+.endif
+
 .if !defined(NO_MAILWRAPPER)
 CONFIGURE_ARGS+=	--enable-sendmail=/usr/sbin/sendmail
 .endif
@@ -80,9 +84,6 @@
 CONFIGURE_ARGS+=	--disable-authlib
 .endif
 
-MAILDROP_SUID?=	root
-MAILDROP_SGID?=	mail
-
 .if defined(NOPORTDOCS)
 # Just install the binary and man pages, no extra documentation
 INSTALL_TARGET=	install-maildrop install-deliverquota install-man
@@ -98,9 +99,15 @@
 DOCS=	AUTHORS INSTALL INSTALL.html README README.html README.postfix \
 	UPGRADE UPGRADE.html maildroptips.txt maildir/README.*
 
-.if !defined(NOPORTDOCS)
 post-install:
+.if !defined(NOPORTDOCS)
 	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
 .endif
+.if defined(MAILDROP_SUID)
+	${CHMOD} u+s ${LOCALBASE}/bin/maildrop
+.endif
+.if defined(MAILDROP_SGID)
+	${CHMOD} g+s ${LOCALBASE}/bin/maildrop
+.endif
 
 .include <bsd.port.post.mk>
--- patch-maildrop ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list