From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Sep 16 02:40:03 2010 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 812431065672 for ; Thu, 16 Sep 2010 02:40:03 +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 5A0A98FC16 for ; Thu, 16 Sep 2010 02:40:03 +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 o8G2e3jk057381 for ; Thu, 16 Sep 2010 02:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o8G2e32k057372; Thu, 16 Sep 2010 02:40:03 GMT (envelope-from gnats) Resent-Date: Thu, 16 Sep 2010 02:40:03 GMT Resent-Message-Id: <201009160240.o8G2e32k057372@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, Anonymous Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD4B4106566C for ; Thu, 16 Sep 2010 02:37:25 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 55CA78FC18 for ; Thu, 16 Sep 2010 02:37:25 +0000 (UTC) Received: by qyk31 with SMTP id 31so4899306qyk.13 for ; Wed, 15 Sep 2010 19:37:24 -0700 (PDT) Received: by 10.229.225.211 with SMTP id it19mr1814568qcb.87.1284604644346; Wed, 15 Sep 2010 19:37:24 -0700 (PDT) Received: from localhost ([208.53.142.42]) by mx.google.com with ESMTPS id 9sm2127147qca.30.2010.09.15.19.37.22 (version=SSLv3 cipher=RC4-MD5); Wed, 15 Sep 2010 19:37:23 -0700 (PDT) Message-Id: <861v8uo1vy.fsf@gmail.com> Date: Thu, 16 Sep 2010 06:31:12 +0400 From: Anonymous To: FreeBSD-gnats-submit@FreeBSD.org Cc: Subject: ports/150611: [patch] lang/perl5.12: preserve permissions for make.conf and manpath.config 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: Thu, 16 Sep 2010 02:40:03 -0000 >Number: 150611 >Category: ports >Synopsis: [patch] lang/perl5.12: preserve permissions for make.conf and manpath.config >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Sep 16 02:40:02 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Anonymous >Release: FreeBSD 9.0-CURRENT amd64 >Organization: >Environment: __MAKE_CONF=$HOME/.make.conf >Description: Currently use.perl script resets permissions to default (umask + group) when spamming in make.conf or manpath.config. This may causes inconvenience for non-root user with his own make.conf as well as reduce security if the files had more restrictive permissions before editing. >How-To-Repeat: - use user-owned make.conf and install the port with SU_CMD - use non-default permissions (non-umask, ACLs, file flags, etc.) >Fix: --- a.diff begins here --- Index: lang/perl5.12/files/use.perl =================================================================== RCS file: /a/.cvsup/ports/lang/perl5.12/files/use.perl,v retrieving revision 1.15 diff -u -p -r1.15 use.perl --- lang/perl5.12/files/use.perl 5 Nov 2009 18:50:45 -0000 1.15 +++ lang/perl5.12/files/use.perl 16 Sep 2010 01:48:40 -0000 @@ -95,6 +95,7 @@ do_cleanup_make_conf() { echo -n "Cleaning up ${MAKE_CONF}..." if [ -f ${MAKE_CONF} ] ; then + /bin/cp -p ${MAKE_CONF} ${MAKE_CONF}.new /usr/bin/awk 's=0; /^#.*use.perl/ { s=1; mode=1 } /^#/ { s=1; if (mode != 1) { mode=0 } } @@ -111,6 +112,7 @@ do_cleanup_manpath() { echo -n "Cleaning up /etc/manpath.config..." if [ -f /etc/manpath.config ] ; then + /bin/cp -p /etc/manpath.config /etc/manpath.config.new /usr/bin/awk 's=0; /^#.*use.perl/ { s=1; mode=1 } /^#/ { s=1; if (mode != 1) { mode=0 } } --- a.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: