From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Jun 13 23:40:08 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C334C1065674 for ; Mon, 13 Jun 2011 23:40:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 996578FC1B for ; Mon, 13 Jun 2011 23:40:08 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p5DNe8e5092981 for ; Mon, 13 Jun 2011 23:40:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p5DNe8PB092980; Mon, 13 Jun 2011 23:40:08 GMT (envelope-from gnats) Resent-Date: Mon, 13 Jun 2011 23:40:08 GMT Resent-Message-Id: <201106132340.p5DNe8PB092980@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Leo Vandewoestijne Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73F66106566B for ; Mon, 13 Jun 2011 23:35:02 +0000 (UTC) (envelope-from leo@srv19.ams1.unicycle.net) Received: from srv19.ams1.unicycle.net.unicycle.net (unicycle-1-pt.tunnel.tserv11.ams1.ipv6.he.net [IPv6:2001:470:1f14:ba7::2]) by mx1.freebsd.org (Postfix) with ESMTP id F170C8FC0C for ; Mon, 13 Jun 2011 23:35:01 +0000 (UTC) Received: from srv19.ams1.unicycle.net (localhost [127.0.0.1]) by srv19.ams1.unicycle.net.unicycle.net (8.14.4/8.14.3) with ESMTP id p5DNYxQB008932 for ; Mon, 13 Jun 2011 23:34:59 GMT (envelope-from leo@srv19.ams1.unicycle.net) Received: (from leo@localhost) by srv19.ams1.unicycle.net (8.14.4/8.14.3/Submit) id p5DNYrcx008804 for FreeBSD-gnats-submit@freebsd.org; Mon, 13 Jun 2011 23:34:53 GMT (envelope-from leo) Message-Id: <20110613233453.GA52238@relay7.ucia.gov> Date: Mon, 13 Jun 2011 23:34:53 +0000 From: Leo Vandewoestijne To: FreeBSD-gnats-submit@FreeBSD.org Cc: Subject: ports/157854: dns/curvedns should use USERS and GROUPS X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2011 23:40:08 -0000 >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 @@ -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 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: