From owner-freebsd-security@FreeBSD.ORG Mon Apr 20 16:49:37 2009 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6A821065678 for ; Mon, 20 Apr 2009 16:49:37 +0000 (UTC) (envelope-from stas@deglitch.com) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 6C3CC8FC25 for ; Mon, 20 Apr 2009 16:49:37 +0000 (UTC) (envelope-from stas@deglitch.com) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 7380F8FC52 for ; Mon, 20 Apr 2009 20:49:36 +0400 (MSD) Received: from stas.flexlabs (unknown [83.166.229.34]) by mx0.deglitch.com (Postfix) with ESMTPSA id 8AE8A8FC2B; Mon, 20 Apr 2009 20:49:34 +0400 (MSD) Date: Mon, 20 Apr 2009 20:49:32 +0400 From: Stanislav Sedov To: Giorgos Keramidas Message-Id: <20090420204932.c6fe17c6.stas@deglitch.com> In-Reply-To: <87eiwtwvwb.fsf@kobe.laptop> References: <200903062256.n26MuA2r085728@pc.jgr.de> <87ljr61t3v.fsf@kobe.laptop> <20090319102606.GA27912@ace.cs.uoi.gr> <87eiwtwvwb.fsf@kobe.laptop> Organization: Deglitch Networks X-Mailer: Sylpheed 2.5.0 (GTK+ 2.12.11; i386-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Mon Apr 20 20:49:36 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 49eca7a0967001169884880 X-Mailman-Approved-At: Mon, 20 Apr 2009 19:36:26 +0000 Cc: Nikos Ntarmos , freebsd-security@freebsd.org Subject: Re: emacs installs a lot of 777 directories X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2009 16:49:38 -0000 On Thu, 19 Mar 2009 14:16:04 +0200 Giorgos Keramidas wrote: > On Thu, 19 Mar 2009 12:26:06 +0200, Nikos Ntarmos wrote: > >On Sun, Mar 15, 2009 at 09:30:44PM +0200, Giorgos Keramidas wrote: > >>On Fri, 6 Mar 2009 23:56:10 +0100 (CET), freebsd001@pc.jgr.de wrote: > >>> Dear list members, > >>> > >>> I am not only wondering about the permissions of several emacs-related > >>> directories as it has recently been mentioned in this thread, but also > >>> about the ownership of several emacs-related files. > >> > >> This seems to be a local installation glitch. > >> > >>>>find . -not -user root | head -n 3 > >>> ./emacs/22.3/etc > >>> ./emacs/22.3/etc/GNUS-NEWS > >>> ./emacs/22.3/etc/fr-drdref.ps > >>> > >>>>find . -not -user root | wc -l > >>> 2643 > > > > That's probably due to the fact that emacs uses something along the > > lines of 'tar -chf - ... | tar -xvf - ...' to copy the files, followed > > (in some cases) by a chown to $LOGNAME (or if that is not set, to > > $USERNAME). If you just 'su', LOGNAME remains set to what it was > > before (i.e. nutzer), while 'su -' will clear that out. > > Yep, that's exactly what the Emacs build glue does. > > One of the directories mentioned in the permission listings of the > thread includes `leim/'. The source of `emacs/leim/Makefile.in' > installs files with tar and chown: > > 240 tar -chf - quail/* ja-dic \ > 241 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\ > ... > 264 find ${INSTALLDIR} -exec chown $${installuser} '{}' ';' > I don't think it's a right thing to do, as it doesn't obey nor SHAREOWN/ SHAREGROUP not SHAREMODE, which all ports are supposed to follow. Exactly for these reason we have special macros COPYTREE_* in bsd.port.mk. Any chance emacs port could be tricked to use these macros instead of a hand- crafted untar command? -- Stanislav Sedov ST4096-RIPE !DSPAM:49eca7a0967001169884880!