Date: Wed, 5 Oct 2011 19:31:37 GMT From: Chris Rees <crees@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/161311: mail/postgrey should use USERS and GROUPS Message-ID: <201110051931.p95JVbKS078358@freefall.freebsd.org> Resent-Message-ID: <201110052009.p95K9bEb058405@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 161311 >Category: ports >Synopsis: mail/postgrey should use USERS and GROUPS >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Oct 05 20:09:37 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Chris Rees >Release: FreeBSD 8.2-STABLE i386 >Organization: >Environment: System: FreeBSD freefall.freebsd.org 8.2-STABLE FreeBSD 8.2-STABLE #4 r220774: Mon Apr 18 13:56:14 UTC 2011 simon@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL i386 >Description: postgrey creates users and groups the 'old-fashioned' way with pkg-install.in. This patch brings it in line with new policy, so that it uses the USERS and GROUPS hooks. >How-To-Repeat: >Fix: --- postgrey.diff begins here --- Index: Makefile =================================================================== RCS file: /home/pcvs/ports/mail/postgrey/Makefile,v retrieving revision 1.28 diff -u -r1.28 Makefile --- Makefile 2 Oct 2011 14:17:54 -0000 1.28 +++ Makefile 5 Oct 2011 19:28:53 -0000 @@ -35,6 +35,9 @@ PGY_GROUPNAME?= ${PGY_USERNAME} PGY_GROUPID?= ${PGY_USERID} PGY_DIR?= /var/db/postgrey + +USERS= ${PGY_USERNAME} +GROUPS= ${PGY_USERID} MAN1= ${PORTNAME}.1 policy-test.1 postgreyreport.1 post-patch: Index: files/pkg-install.in =================================================================== RCS file: /home/pcvs/ports/mail/postgrey/files/pkg-install.in,v retrieving revision 1.1 diff -u -r1.1 pkg-install.in --- files/pkg-install.in 27 Jun 2007 21:13:24 -0000 1.1 +++ files/pkg-install.in 5 Oct 2011 19:28:53 -0000 @@ -16,23 +16,6 @@ exit 1 fi - # Create group if required - if pw group show "%%GROUP%%" >/dev/null 2>&1; then - echo "---> Using existing group \"%%GROUP%%\"" - else - echo "---> Adding group \"%%GROUP%%\" (%%GID%%)" - /usr/sbin/pw groupadd %%GROUP%% -g %%GID%% || exit 1 - fi - - # Create user if required - if pw user show "%%USER%%" >/dev/null 2>&1; then - echo "---> Using existing user \"%%USER%%\"" - else - echo "---> Adding user \"%%USER%%\" (%%UID%%)" - pw useradd "%%USER%%" -u "%%UID%%" -g "%%GROUP%%" -h - \ - -d "%%POSTGREYDIR%%" -s "/sbin/nologin" -c "Postgrey Owner" || exit 1 - fi - # Create home directory if required if [ -d "%%POSTGREYDIR%%" ]; then echo "---> Using existing Postgrey database directory (%%POSTGREYDIR%%)" --- postgrey.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?201110051931.p95JVbKS078358>