From owner-freebsd-stable@FreeBSD.ORG Tue Aug 25 09:27:33 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8447106568F for ; Tue, 25 Aug 2009 09:27:33 +0000 (UTC) (envelope-from db@danielbond.org) Received: from mail.nsn.no (mailone.nsn.no [62.89.38.160]) by mx1.freebsd.org (Postfix) with SMTP id 18C1D8FC1D for ; Tue, 25 Aug 2009 09:27:32 +0000 (UTC) Received: (qmail 60323 invoked by uid 0); 25 Aug 2009 09:27:32 -0000 Received: from unknown (HELO ?172.16.3.90?) (85.95.44.187) by mail.nsn.no with SMTP; 25 Aug 2009 09:27:32 -0000 Message-Id: <45B77D27-08F0-4C17-ABA8-5420A7D55CBB@danielbond.org> From: Daniel Bond To: Colin Percival In-Reply-To: <913F5042-AE21-4B80-9273-35132289959D@danielbond.org> Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-69-154825341" Mime-Version: 1.0 (Apple Message framework v936) Date: Tue, 25 Aug 2009 11:27:28 +0200 References: <200908250828.n7P8SwIC056483@g5.nsn.no> <913F5042-AE21-4B80-9273-35132289959D@danielbond.org> X-Pgp-Agent: GPGMail 1.2.0 (v56) Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.936) Cc: freebsd-stable@freebsd.org Subject: Re: [PATCH] Portsnap - set a good umask, for ports consistancy X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Aug 2009 09:27:34 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-69-154825341 Content-Type: multipart/mixed; boundary=Apple-Mail-68-154825311 --Apple-Mail-68-154825311 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Sorry, seems the patch was not included. when I forwarded mail. I've attached it to this mail. Cheers! --Apple-Mail-68-154825311 Content-Disposition: attachment; filename=portsnap.umask.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="portsnap.umask.patch" Content-Transfer-Encoding: 7bit --- portsnap.orig 2009-08-25 10:20:38.000000000 +0200 +++ portsnap 2009-08-25 10:27:13.000000000 +0200 @@ -1036,6 +1036,10 @@ # Set LC_ALL in order to avoid problems with character ranges like [A-Z]. export LC_ALL=C +# Set a standard umask, so directory permissions stays consistent, regardless +# of which sudo-enabled user is calling portsnap, and his configured umask. +umask 0022 + get_params $@ for COMMAND in ${COMMANDS}; do cmd_${COMMAND} --Apple-Mail-68-154825311 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On Aug 25, 2009, at 10:40 AM, Daniel Bond wrote: > Hi, > > I have a case where some users have different umasks (0077 in some > cases). When these users call portsnap (via sudo), it leaves the > port-directories permissions in an inconsistent state, and people > need to use sudo to list files. > I'm not sure honoring "umask" is good from a users-perspective, even > if umask is a standard UNIX mechanism of directory and file > permissions. > > I suggest setting a reasonable umask, for the duration of the > portsnap program. As far as I know, this should only effect /usr/ > ports, and if a user wishes to "hide" the contents of this folder, a > manual chmod of it should not be overridden, until /usr/ports is > completely removed and recreated. > > If this is a bad suggestion, would it be feasible to make it a > config-option? > > > BTW, I really like portsnap - it is a great program. Also I'd like > to note that I am very happy with speed from european mirrors these > days, which I've been grunting about earlier. Thanks for the effort > you put into this! :) > > > > Best regards, > > > Daniel Bond. > > Begin forwarded message: > >> From: Daniel Bond >> Date: August 25, 2009 10:28:58 AM GMT+02:00 >> To: db@danielbond.org >> Subject: [PATCH] Portsnap - set a good umask, for ports consistancy >> > --Apple-Mail-68-154825311-- --Apple-Mail-69-154825341 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.11 (Darwin) iEYEARECAAYFAkqTroMACgkQF4Ca8+3pySWiNQCglzVdMTIDTnM5WoU6jx9Lwlxj OLYAn16NS3t3Qj1mnaMdAwzjAiUrVRYw =EWbp -----END PGP SIGNATURE----- --Apple-Mail-69-154825341--