From os@brain.cc.rsu.ru  Thu May 20 00:58:15 2004
Return-Path: <os@brain.cc.rsu.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D6FA216A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 20 May 2004 00:58:15 -0700 (PDT)
Received: from brain.cc.rsu.ru (brain.cc.rsu.ru [195.208.252.154])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 079DA43D45
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 20 May 2004 00:58:15 -0700 (PDT)
	(envelope-from os@brain.cc.rsu.ru)
Received: from brain.cc.rsu.ru (localhost [127.0.0.1])
	by brain.cc.rsu.ru (8.12.11/8.12.9) with ESMTP id i4K7vUkl077761;
	Thu, 20 May 2004 11:57:30 +0400 (MSD)
	(envelope-from os@brain.cc.rsu.ru)
Received: (from os@localhost)
	by brain.cc.rsu.ru (8.12.11/8.12.9/Submit) id i4K7vShX077742;
	Thu, 20 May 2004 11:57:28 +0400 (MSD)
	(envelope-from os)
Message-Id: <200405200757.i4K7vShX077742@brain.cc.rsu.ru>
Date: Thu, 20 May 2004 11:57:28 +0400 (MSD)
From: Oleg Sharoiko <os@rsu.ru>
Reply-To: Oleg Sharoiko <os@rsu.ru>
To: FreeBSD-gnats-submit@freebsd.org, dean@odyssey.apana.org.au
Cc: and@rsu.ru
Subject: [PATCH] mail/dcc-dccd has several problems
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         66927
>Category:       ports
>Synopsis:       [PATCH] mail/dcc-dccd has several problems
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 20 01:00:47 PDT 2004
>Closed-Date:    Sun Nov 21 00:05:00 GMT 2004
>Last-Modified:  Sun Nov 21 00:05:00 GMT 2004
>Originator:     Oleg Sharoiko
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
Computer Center of Rostov State University
>Environment:
System: FreeBSD brain.cc.rsu.ru 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue May 18 18:15:48 MSD 2004 os@brain.cc.rsu.ru:/usr/obj/usr/src/sys/brain.athlon-xp.HEAD.2004-01-30 i386


	
>Description:
	mail/dcc-dccd has two problems:

	1. dccifd doesn't relate to sendmail so it should be controlled
	by seprate option in Makefile

	2. milter header/library is not detected when sendmail is
	installed from ports

	In addition I wold request for new feature: ability to specify
	userid for setuid binaries installed by port.

	The attached patch solves the problems and adds DCCUSER

>How-To-Repeat:
	Install base system without sendmail.
	Build and install sendmail from ports
	Try to install mail/dcc-dccd port
>Fix:
	
	Apply the patch and put the file (attached bellow)
	as files/patch-configure

	Patch:

diff -Nur --exclude=CVS dcc-dccd/Makefile /tmp/dcc-dccd/Makefile
--- dcc-dccd/Makefile	Thu May 20 11:24:56 2004
+++ /tmp/dcc-dccd/Makefile	Thu May 20 11:19:52 2004
@@ -22,15 +22,64 @@
 MANCOMPRESSED=	yes
 MAN8=		cdcc.8 dbclean.8 dblist.8 dcc.8 dccd.8 dccifd.8 dccm.8 \
 		dccproc.8 dccsight.8
+#
+# User for dcc files and SUID binaries
+#
+DCCUSER?=	root
 
-.if exists(/usr/lib/libmilter.a) || exists(${LOCALBASE}/lib/libmilter.a)
-PLIST_SUB+=	WITH_SENDMAIL=""
+#
+# You can choose the sendmail to be used by specifying
+#
+# WITH_SENDMAIL_BASE=yes
+#  or
+# WITH_SENDMAIL_PORT=yes
+#
+
+# if no preference was set, check for an up to date base version
+# but give an installed port preference over it.
+
+.include <bsd.port.pre.mk>
+
+.if !defined(WITH_SENDMAIL_BASE) && \
+    !defined(WITH_SENDMAIL_PORT) && \
+    !exists(${LOCALBASE}/lib/libmilter.a)
+WITH_SENDMAIL_BASE=yes
+.endif
+
+.if defined(WITH_SENDMAIL_BASE)
+.if exists(/usr/lib/libmilter.a)
+MILTERBASE=     /usr
+WITH_SENDMAIL=yes
+.else
+BROKEN= "Base system sendmail not found or too old, rebuild with WITH_SENDMAIL_P
+ORT=yes"
+.endif
 .else
-CONFIGURE_ARGS+=	--disable-dccm --disable-dccifd
-PLIST_SUB+=	WITH_SENDMAIL="@comment "
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail
+MILTERBASE?=    ${LOCALBASE}
+WITH_SENDMAIL=yes
 .endif
 
-.include <bsd.port.pre.mk>
+.if !defined(WITHOUT_SENDMAIL) && defined(WITH_SENDMAIL)
+MILTERINC=      ${MILTERBASE}/include
+MILTERLIB=      ${MILTERBASE}/lib
+
+CPPFLAGS+=      -I${MILTERINC}
+LDFLAGS+=       -L${MILTERLIB}
+
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
+CONFIGURE_ARGS+= --with-sendmail=${MILTERBASE}
+.else
+CONFIGURE_ARGS+= --disable-dccm
+.endif
+
+.if defined(WITHOUT_DCCIFD)
+CONFIGURE_ARGS+= --disable-dccifd
+.else
+WITH_DCCIFD=yes
+.endif
+
+CONFIGURE_ARGS+= --with-uid=${DCCUSER}
 
 post-patch:
 	${FIND} ${WRKSRC} -type f -exec \
diff -Nur --exclude=CVS dcc-dccd/pkg-plist /tmp/dcc-dccd/pkg-plist
--- dcc-dccd/pkg-plist	Thu May 20 11:24:56 2004
+++ /tmp/dcc-dccd/pkg-plist	Thu May 20 11:19:52 2004
@@ -14,7 +14,7 @@
 dcc/grey_whitelist
 dcc/ids
 dcc/libexec/cron-dccd
-%%WITH_SENDMAIL%%dcc/libexec/dccifd
+%%WITH_DCCIFD%%dcc/libexec/dccifd
 %%WITH_SENDMAIL%%dcc/libexec/dccm
 dcc/libexec/dbclean
 dcc/libexec/dblist

	files/patch-configure:


--- configure.000	Thu Apr 22 20:44:48 2004
+++ configure	Thu May 20 10:42:19 2004
@@ -2238,6 +2238,15 @@
     SENDMAIL_EVAL="$SENDMAIL"
     with_sendmail=yes
 fi
+# 
+if test -n "$SENDMAIL"; then
+    if test -f $SENDMAIL/include/libmilter/mfapi.h -a -f $SENDMAIL/lib/libmilter.a; then
+        SENDMAIL_OBJ=$SENDMAIL/lib
+        SENDMAIL_OBJ_EVAL=$SENDMAIL_OBJ
+        SENDMAIL_LIB=$SENDMAIL_OBJ/libmilter.a
+    fi
+fi
+#
 if test -z "$SENDMAIL"; then
     # prefer a parallel ../sendmail directory
     DEPTH=.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: vs 
State-Changed-When: Fri May 21 06:57:08 PDT 2004 
State-Changed-Why:  
Forwarded PR to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=66927 

Adding to audit trail from misfiled PRs ports/66929, 66930, 66931, and
66932::

 On Thu, 20 May 2004, Oleg Sharoiko wrote:

 >      1. dccifd doesn't relate to sendmail so it should be controlled
 >      by seprate option in Makefile

 Which version have you applied these patches to?

 Regards,

 d.

 asterix, ~ > grep '$FreeBSD' /usr/ports/mail/dcc-dccd/Makefile
 # $FreeBSD: ports/mail/dcc-dccd/Makefile,v 1.10 2004/05/02 02:44:06 petef Exp $

 --
 Oleg Sharoiko.

 A patch was submitted a couple days ago to update to a new release. The
 new version should be committed first - then would you be happy to assess
 the new release and suggest a patch for it?
 
 Regards,
 
 d.
 
 I'll check the new version. I was upgrading all my installed ports and could
 not update ports tree. I'll check the new version as soon as my portupgrade
 over.
 
From: Volker Stolz <vs@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org, os@rsu.ru
Cc: dean@odyssey.apana.org.au
Subject: Re: ports/66927: [PATCH] mail/dcc-dccd has several problems
Date: Fri, 21 May 2004 15:56:58 +0200

 Will this patch still be necessary after PR ports/66797?
 
 Volker

From: Oleg Sharoiko <os@rsu.ru>
To: Volker Stolz <vs@FreeBSD.org>
Cc: freebsd-gnats-submit@FreeBSD.org, dean@odyssey.apana.org.au
Subject: Re: ports/66927: [PATCH] mail/dcc-dccd has several problems
Date: Fri, 21 May 2004 18:19:04 +0400 (MSD)

 On Fri, 21 May 2004, Volker Stolz wrote:
 
 VS>Will this patch still be necessary after PR ports/66797?
 
 I hink it will. I'll review my patch and send it at monday (2004-05-24). Sorry
 for this delay.
 
 -- 
 Oleg Sharoiko.
 Software and Network Engineer
 Computer Center of Rostov State University.

From: Dean Hollister <dean@odyssey.apana.org.au>
To: Volker Stolz <vs@FreeBSD.org>
Cc: freebsd-gnats-submit@FreeBSD.org, os@rsu.ru
Subject: Re: ports/66927: [PATCH] mail/dcc-dccd has several problems
Date: Sat, 22 May 2004 07:53:12 +0800

 At 15:56 21/05/2004 +0200, you wrote:
 
 >Will this patch still be necessary after PR ports/66797?
 
 It may - as the patch is using the current port, and not the new release 
 under ports/66797.
 
 The priority is to get the possible security exploit fixed by installing a 
 new release.
 
 Regards,
 
 d.
 
 

From: Oleg Sharoiko <os@rsu.ru>
To: Volker Stolz <vs@FreeBSD.org>
Cc: freebsd-gnats-submit@FreeBSD.org, dean@odyssey.apana.org.au,
	Andrey Beresovsky <and@rsu.ru>
Subject: Re: ports/66927: [PATCH] mail/dcc-dccd has several problems
Date: Wed, 26 May 2004 13:19:27 +0400 (MSD)

 Hello!
 
 Here is the patch against the recent version of mail/dcc-dccd  (1.2.48)
 It includes:
 
 1. Correct detection of sendmail from ports
 
 2. Ability to specify wether to user base sendmail or ports sendmail (work
 with base sendmail needs to be tested - I only have boxes with sendmail from
 ports here)
 
 3. Config file is not deleted with pkg_delete and not overwritten with make
 install. Instead dcc_conf.dist is always installed and dcc_conf is installed
 only when it doesn't exist.
 
 4. Ability to specify user for setuid programs. I think this should be changed
 from root to some special user, but maybe this needs some deeper testing. My
 patch defaults to dcc:dcc, but please change this if you think I'm wrong. The
 user is created with pw if it doesn't exist.
 
 5. Separate options to enable/disable building of dccm and dccifd
 
 diff -uNr --exclude=CVS dcc-dccd/Makefile dcc-dccd.new/Makefile
 --- dcc-dccd/Makefile	Wed May 26 12:51:38 2004
 +++ dcc-dccd.new/Makefile	Wed May 26 12:46:24 2004
 @@ -18,19 +18,84 @@
 
  USE_REINPLACE=	yes
  HAS_CONFIGURE=	yes
 -CONFIGURE_ARGS=	--homedir=${PREFIX}/dcc
  MANCOMPRESSED=	yes
  MAN8=		cdcc.8 dbclean.8 dblist.8 dcc.8 dccd.8 dccifd.8 dccm.8 \
  		dccproc.8 dccsight.8
 
 -.if exists(/usr/lib/libmilter.a) || exists(${LOCALBASE}/lib/libmilter.a)
 +PKGINSTALL=	${WRKDIR}/pkg-install
 +PKGDEINSTALL=	${WRKDIR}/pkg-deinstall
 +
 +#
 +# User for dcc files and SUID binaries
 +#
 +DCCUSER?=	dcc
 +DCCGROUP?=	dcc
 +
 +#
 +# You can choose the sendmail to be used by specifying
 +#
 +# WITH_SENDMAIL_BASE=yes
 +#  or
 +# WITH_SENDMAIL_PORT=yes
 +#
 +
 +# if no preference was set, check for an up to date base version
 +# but give an installed port preference over it.
 +
 +HOMEDIR=	${PREFIX}/dcc
 +CONFIGURE_ARGS=	--homedir=${HOMEDIR}
 +
 +.include <bsd.port.pre.mk>
 +
 +.if !defined(WITH_SENDMAIL_BASE) && \
 +    !defined(WITH_SENDMAIL_PORT) && \
 +    !exists(${LOCALBASE}/lib/libmilter.a)
 +WITH_SENDMAIL_BASE=yes
 +.endif
 +
 +.if defined(WITH_SENDMAIL_BASE)
 +.if exists(/usr/lib/libmilter.a)
 +MILTERBASE=     /usr
 +WITH_SENDMAIL=yes
 +.else
 +BROKEN= "Base system sendmail not found or too old, rebuild with WITH_SENDMAIL_P
 +ORT=yes"
 +.endif
 +.else
 +BUILD_DEPENDS+= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail
 +MILTERBASE?=    ${LOCALBASE}
 +WITH_SENDMAIL=yes
 +.endif
 +
 +.if !defined(WITHOUT_SENDMAIL) && defined(WITH_SENDMAIL)
 +MILTERINC=      ${MILTERBASE}/include
 +MILTERLIB=      ${MILTERBASE}/lib
 +
 +CPPFLAGS+=      -I${MILTERINC}
 +LDFLAGS+=       -L${MILTERLIB}
 +
 +CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
 +CONFIGURE_ARGS+= --with-sendmail=${MILTERBASE}
  PLIST_SUB+=	WITH_SENDMAIL=""
  .else
 -CONFIGURE_ARGS+=	--disable-dccm --disable-dccifd
 +CONFIGURE_ARGS+= --disable-dccm
  PLIST_SUB+=	WITH_SENDMAIL="@comment "
  .endif
 
 -.include <bsd.port.pre.mk>
 +.if defined(WITHOUT_DCCIFD)
 +CONFIGURE_ARGS+= --disable-dccifd
 +PLIST_SUB+=	WITH_DCCIFD="@comment "
 +.else
 +PLIST_SUB+=	WITH_DCCIFD=""
 +.endif
 +
 +CONFIGURE_ARGS+= --with-uid=${DCCUSER}
 +PLIST_SUB+=	DCCUSER=${DCCUSER} \
 +		DCCGROUP=${DCCGROUP}
 +
 +SED_SCRIPT=	-e 's|%%PREFIX%%|${PREFIX}|g' \
 +		-e 's|%%DCCUSER%%|${DCCUSER}|g' \
 +		-e 's|%%DCCGROUP%%|${DCCGROUP}|g'
 
  post-patch:
  	${FIND} ${WRKSRC} -type f -exec \
 @@ -38,5 +103,17 @@
  	${REINPLACE_CMD} -e 's,PTHREAD_LDFLAGS="$$PTHREAD_LDFLAGS -pthread,PTHREAD_LDFLAGS="$$PTHREAD_LDFLAGS,g' ${WRKSRC}/configure
  	${REINPLACE_CMD} -e 's,FreeBSD)\n\tPTHREAD_LDFLAGS,FreeBSD)\n\tDCC_CFLAGS="${PTHREAD_CFLAGS} $$DCC_CFLAGS"\n\tPTHREAD_LDFLAGS,g' ${WRKSRC}/configure
  	${REINPLACE_CMD} -e 's,PTHREAD_LIBS="$$PTHREAD_LIBS -lc_r,PTHREAD_LIBS=" ${PTHREAD_LIBS},g' ${WRKSRC}/configure
 +
 +post-build:
 +	@${SED} ${SED_SCRIPT} ${PKGDIR}/pkg-install >${PKGINSTALL}
 +	@${SED} ${SED_SCRIPT} ${PKGDIR}/pkg-deinstall >${PKGDEINSTALL}
 +
 +pre-install:
 +	@${SETENV} PKG_PREFIX=${PREFIX} \
 +		${SH} ${PKGINSTALL} ${PREFIX} PRE-INSTALL
 +
 +post-install:
 +	@[ -s ${HOMEDIR}/dcc_conf ] || \
 +		${CP} ${HOMEDIR}/dcc_conf.dist ${HOMEDIR}/dcc_conf
 
  .include <bsd.port.post.mk>
 diff -uNr --exclude=CVS dcc-dccd/Makefile.orig dcc-dccd.new/Makefile.orig
 --- dcc-dccd/Makefile.orig	Wed May 26 12:46:54 2004
 +++ dcc-dccd.new/Makefile.orig	Thu Jan  1 03:00:00 1970
 @@ -1,42 +0,0 @@
 -# New ports collection makefile for:	mail/dcc-dccd
 -# Date created:		Wed Oct 9 19:30:00 WST 2002
 -# Whom:			Dean Hollister <dean@odyssey.apana.org.au>
 -#
 -# $FreeBSD: ports/mail/dcc-dccd/Makefile,v 1.11 2004/05/23 21:39:44 sergei Exp $
 -#
 -
 -PORTNAME=	dcc-dccd
 -PORTVERSION=	1.2.48
 -CATEGORIES=	mail
 -MASTER_SITES=	http://www.rhyolite.com/anti-spam/dcc/source/old/ \
 -		http://www.wa.apana.org.au/~dean/sources/ \
 -		ftp://ftp.wa.apana.org.au/pub/unix/packages/
 -EXTRACT_SUFX=	.tar.Z
 -
 -MAINTAINER=	dean@odyssey.apana.org.au
 -COMMENT=	Distributed Checksum Clearinghouse procmail, sendmail support
 -
 -USE_REINPLACE=	yes
 -HAS_CONFIGURE=	yes
 -CONFIGURE_ARGS=	--homedir=${PREFIX}/dcc
 -MANCOMPRESSED=	yes
 -MAN8=		cdcc.8 dbclean.8 dblist.8 dcc.8 dccd.8 dccifd.8 dccm.8 \
 -		dccproc.8 dccsight.8
 -
 -.if exists(/usr/lib/libmilter.a) || exists(${LOCALBASE}/lib/libmilter.a)
 -PLIST_SUB+=	WITH_SENDMAIL=""
 -.else
 -CONFIGURE_ARGS+=	--disable-dccm --disable-dccifd
 -PLIST_SUB+=	WITH_SENDMAIL="@comment "
 -.endif
 -
 -.include <bsd.port.pre.mk>
 -
 -post-patch:
 -	${FIND} ${WRKSRC} -type f -exec \
 -		${REINPLACE_CMD} -e 's,/usr/local,${PREFIX},g' {} \;
 -	${REINPLACE_CMD} -e 's,PTHREAD_LDFLAGS="$$PTHREAD_LDFLAGS -pthread,PTHREAD_LDFLAGS="$$PTHREAD_LDFLAGS,g' ${WRKSRC}/configure
 -	${REINPLACE_CMD} -e 's,FreeBSD)\n\tPTHREAD_LDFLAGS,FreeBSD)\n\tDCC_CFLAGS="${PTHREAD_CFLAGS} $$DCC_CFLAGS"\n\tPTHREAD_LDFLAGS,g' ${WRKSRC}/configure
 -	${REINPLACE_CMD} -e 's,PTHREAD_LIBS="$$PTHREAD_LIBS -lc_r,PTHREAD_LIBS=" ${PTHREAD_LIBS},g' ${WRKSRC}/configure
 -
 -.include <bsd.port.post.mk>
 diff -uNr --exclude=CVS dcc-dccd/files/patch-configure dcc-dccd.new/files/patch-configure
 --- dcc-dccd/files/patch-configure	Thu Jan  1 03:00:00 1970
 +++ dcc-dccd.new/files/patch-configure	Wed May 26 12:46:24 2004
 @@ -0,0 +1,18 @@
 +--- configure.orig	Mon May 17 21:32:49 2004
 ++++ configure	Tue May 25 18:19:48 2004
 +@@ -2244,6 +2244,15 @@
 +     SENDMAIL_EVAL="$SENDMAIL"
 +     with_sendmail=yes
 + fi
 ++#
 ++if test -n "$SENDMAIL" -a "$SENDMAIL" != "no"; then
 ++    if test -f $SENDMAIL/include/libmilter/mfapi.h -a -f $SENDMAIL/lib/libmilter.a; then
 ++        SENDMAIL_OBJ=$SENDMAIL/lib
 ++        SENDMAIL_OBJ_EVAL=$SENDMAIL_OBJ
 ++        SENDMAIL_LIB=$SENDMAIL_OBJ/libmilter.a
 ++    fi
 ++fi
 ++#
 + if test -z "$SENDMAIL"; then
 +     # prefer a parallel ../sendmail directory
 +     DEPTH=.
 diff -uNr --exclude=CVS dcc-dccd/files/patch-homedir::Makefile.in dcc-dccd.new/files/patch-homedir::Makefile.in
 --- dcc-dccd/files/patch-homedir::Makefile.in	Thu Jan  1 03:00:00 1970
 +++ dcc-dccd.new/files/patch-homedir::Makefile.in	Wed May 26 12:46:24 2004
 @@ -0,0 +1,15 @@
 +--- homedir/Makefile.in	Tue May 25 20:37:04 2004
 ++++ homedir/Makefile.in	Tue May 25 20:38:04 2004
 +@@ -28,11 +28,7 @@
 + install:
 + 	for nm in $(INST_HOMEDIR) $(INST_HOMEDIR)/log; do \
 + 	  $(HINSTALL) -m 755 -d $$nm; done
 +-	if test -s $(INST_HOMEDIR)/dcc_conf; then \
 +-	  sh make-dcc_conf -h $(INST_HOMEDIR); \
 +-	else \
 +-	  $(HINSTALL) -m 644 dcc_conf $(INST_HOMEDIR)/dcc_conf; \
 +-	fi
 ++	$(HINSTALL) -m 644 dcc_conf $(INST_HOMEDIR)/dcc_conf.dist
 + 	for nm in flod grey_flod whitelist grey_whitelist \
 + 		whiteclnt whitecommon; do \
 + 	  if test ! -f $(INST_HOMEDIR)/$$nm; then \
 diff -uNr --exclude=CVS dcc-dccd/pkg-deinstall dcc-dccd.new/pkg-deinstall
 --- dcc-dccd/pkg-deinstall	Thu Jan  1 03:00:00 1970
 +++ dcc-dccd.new/pkg-deinstall	Wed May 26 12:46:24 2004
 @@ -0,0 +1,13 @@
 +#!/bin/sh
 +# $FreeBSD$
 +
 +if [ "$2" != "POST-DEINSTALL" ]; then
 +	exit 0
 +fi
 +
 +DCCUSER=%%DCCUSER%%
 +
 +if pw usershow "${DCCUSER}" 2>/dev/null 1>&2; then
 +	echo "To delete ${DCCUSER} user permanently, use 'pw userdel \"${DCCUSER}\"'"
 +fi
 +exit 0
 diff -uNr --exclude=CVS dcc-dccd/pkg-install dcc-dccd.new/pkg-install
 --- dcc-dccd/pkg-install	Thu Jan  1 03:00:00 1970
 +++ dcc-dccd.new/pkg-install	Wed May 26 12:46:24 2004
 @@ -0,0 +1,34 @@
 +#!/bin/sh
 +# $FreeBSD$
 +
 +PREFIX=${PKG_PREFIX:-%%PREFIX%%}
 +
 +DCCUSER=%%DCCUSER%%
 +DCCGROUP=%%DCCGROUP%%
 +
 +if [ "$2" = "PRE-INSTALL" ]; then
 +
 +	if ! pw groupshow "$DCCGROUP" 2>/dev/null 1>&2; then
 +		if pw groupadd $DCCGROUP; then
 +			echo "=> Added group \"$DCCGROUP\"."
 +		else
 +			echo "=> Adding group \"$DCCGROUP\" failed..."
 +			exit 1
 +		fi
 +	fi
 +
 +	if ! pw usershow "$DCCUSER" 2>/dev/null 1>&2; then
 +		if pw useradd $DCCUSER -g $DCCGROUP -h - \
 +			-s "/sbin/nologin" -d "/nonexistent" \
 +			-c "Distributed Checksum Clearinghouse"; \
 +		then
 +			echo "=> Added user \"$DCCUSER\"."
 +		else
 +			echo "=> Adding user \"$DCCUSER\" failed..."
 +			exit 1
 +		fi
 +	fi
 +
 +fi
 +
 +exit 0
 diff -uNr --exclude=CVS dcc-dccd/pkg-plist dcc-dccd.new/pkg-plist
 --- dcc-dccd/pkg-plist	Wed May 26 12:51:38 2004
 +++ dcc-dccd.new/pkg-plist	Wed May 26 12:46:24 2004
 @@ -8,13 +8,14 @@
  dcc/cgi-bin/list-log
  dcc/cgi-bin/list-msg
  dcc/cgi-bin/webuser-notify
 -dcc/dcc_conf
 +@unexec if cmp -s %D/dcc/dcc_conf %D/dcc/dcc_conf.dist; then rm -f %D/dcc/dcc_conf; fi
 +dcc/dcc_conf.dist
  dcc/flod
  dcc/grey_flod
  dcc/grey_whitelist
  dcc/ids
  dcc/libexec/cron-dccd
 -%%WITH_SENDMAIL%%dcc/libexec/dccifd
 +%%WITH_DCCIFD%%dcc/libexec/dccifd
  %%WITH_SENDMAIL%%dcc/libexec/dccm
  dcc/libexec/dbclean
  dcc/libexec/dblist
 
 -- 
 Oleg Sharoiko.
 Software and Network Engineer
 Computer Center of Rostov State University.
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Thu Jun 24 22:48:43 GMT 2004 
State-Changed-Why:  
Feedback received. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=66927 
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Sat Aug 28 04:03:50 GMT 2004 
State-Changed-Why:  
To maintainer: do you approve of this latest set of changes? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=66927 

From: Dean Hollister <dean@odyssey.apana.org.au>
To: Oleg Sharoiko <os@rsu.ru>
Cc: freebsd-gnats-submit@FreeBSD.org, dean@odyssey.apana.org.au,
	Andrey Beresovsky <and@rsu.ru>
Subject: Re: ports/66927: [PATCH] mail/dcc-dccd has several problems
Date: Sat, 20 Nov 2004 21:55:49 +0800

 At 13:19 26/05/2004 +0400, you wrote:
 
 >Here is the patch against the recent version of mail/dcc-dccd  (1.2.48)
 
 Upgrade to 1.2.58, including these patches, submitted via PR ports/74158. 
 This PR can now be closed.
 
 Regards,
 
 d.
 
 
 
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Sun Nov 21 00:04:34 GMT 2004 
State-Changed-Why:  
Superceded by ports/74158. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=66927 
>Unformatted:
