Date: Tue, 25 Aug 2009 11:27:28 +0200 From: Daniel Bond <db@danielbond.org> To: Colin Percival <cperciva@freebsd.org> Cc: freebsd-stable@freebsd.org Subject: Re: [PATCH] Portsnap - set a good umask, for ports consistancy Message-ID: <45B77D27-08F0-4C17-ABA8-5420A7D55CBB@danielbond.org> In-Reply-To: <913F5042-AE21-4B80-9273-35132289959D@danielbond.org> References: <200908250828.n7P8SwIC056483@g5.nsn.no> <913F5042-AE21-4B80-9273-35132289959D@danielbond.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <db@g5.nsn.no> >> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45B77D27-08F0-4C17-ABA8-5420A7D55CBB>