Date: Mon, 13 Jun 2011 23:34:53 +0000 From: Leo Vandewoestijne <freebsd@dns-lab.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/157854: dns/curvedns should use USERS and GROUPS Message-ID: <20110613233453.GA52238@relay7.ucia.gov> Resent-Message-ID: <201106132340.p5DNe8PB092980@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 157854 >Category: ports >Synopsis: dns/curvedns should use USERS and GROUPS >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Mon Jun 13 23:40:08 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Leo Vandewoestijne >Release: >Organization: DNS-Lab >Environment: >Description: PR 157577 reported the curvedns port uses pkg-install to create new users, instead of using USERS= and GROUPS= This patch merges the suggested fix, includes my suggested corrections, and includes an additional hint in the pkg-message. >How-To-Repeat: >Fix: NOTE: pkg-install should be deleted! --- curvedns.patch begins here --- diff -ruN curvedns.bak/Makefile curvedns/Makefile --- curvedns.bak/Makefile 2011-03-25 20:16:51.000000000 +0000 +++ curvedns/Makefile 2011-06-13 22:31:24.000000000 +0000 @@ -22,16 +22,12 @@ CONFIGURE_SCRIPT= configure.nacl ALL_TARGET= # yes, an empty target. -CURVE_USER= bind -CURVE_GROUP= bind +USERS= bind +GROUPS= bind CURVE_UID= 53 CURVE_GID= 53 -SUB_FILES= pkg-install pkg-message pkg-deinstall -SUB_LIST= CURVE_USER=${CURVE_USER} \ - CURVE_GROUP=${CURVE_GROUP} \ - CURVE_UID=${CURVE_UID} \ - CURVE_GID=${CURVE_GID} +SUB_FILES= pkg-message pkg-deinstall .include <bsd.port.pre.mk> @@ -58,7 +54,6 @@ ${CHOWN} -R ${CURVE_UID}:${CURVE_GID} ${PREFIX}/etc/curvedns ${CHMOD} 755 ${PREFIX}/etc/curvedns/run ${PREFIX}/etc/curvedns/log/run ${CHMOD} 0700 ${PREFIX}/etc/curvedns/env - ${SH} ${PKGINSTALL} @${CAT} ${PKGMESSAGE} .include <bsd.port.post.mk> diff -ruN curvedns.bak/files/pkg-install.in curvedns/files/pkg-install.in --- curvedns.bak/files/pkg-install.in 2011-03-04 13:45:40.000000000 +0000 +++ curvedns/files/pkg-install.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -#!/bin/sh -# $FreeBSD: ports/dns/curvedns/files/pkg-install.in,v 1.1 2011/03/04 13:45:40 miwi Exp $ - -if ! pw groupshow %%CURVE_GROUP%% 2>/dev/null 1>&2; then - if pw groupadd %%CURVE_GROUP%% -g %%CURVE_GID%%; then - echo "Added group %%CURVE_GROUP%%" - else - echo "Adding group %%CURVE_GROUP%% failed..." - exit 1 - fi -fi - -if ! pw usershow %%CURVE_USER%% 2>/dev/null 1>&2; then - if pw useradd %%CURVE_USER%% -u %%CURVE_UID%% -g %%CURVE_GROUP%% -h - \ - -s "/usr/sbin/nologin" -d "/" \ - -c "Bind Sandbox"; \ - then - echo "Added user %%CURVE_USER%%" - else - echo "Adding user %%CURVE_USER%% failed..." - exit 1 - fi -fi - -exit 0 diff -ruN curvedns.bak/files/pkg-message.in curvedns/files/pkg-message.in --- curvedns.bak/files/pkg-message.in 2011-01-28 17:41:57.000000000 +0000 +++ curvedns/files/pkg-message.in 2011-06-13 22:33:35.000000000 +0000 @@ -7,6 +7,8 @@ ------- configure ----------------------------------------- $EDITOR %%PREFIX%%/etc/curvedns/run + # set user to "bind" (required) + # adjust IP / ports (if desired) ------- prepare/startup ----------------------------------- mkdir /var/service --- curvedns.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110613233453.GA52238>