From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.bugs Subject: bug#3712: 23.1.50; SECURITY: Tramp creates -rwxrwxrwx permission files with /su and /sudo method Date: Tue, 30 Jun 2009 01:31:50 +0300 Message-ID: <878wjau0x5.fsf@iki.fi> References: <87ljnbax4h.fsf@iki.fi> <8763eevosc.fsf@iki.fi> <87ws6uzqqg.fsf@gmx.de> Reply-To: Teemu Likonen , 3712@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1246316268 13297 80.91.229.12 (29 Jun 2009 22:57:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Jun 2009 22:57:48 +0000 (UTC) Cc: Michael Albinus To: 3712@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 30 00:57:41 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MLPn8-0006b7-HD for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Jun 2009 00:57:38 +0200 Original-Received: from localhost ([127.0.0.1]:56649 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MLPn8-0003cg-3V for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Jun 2009 18:57:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MLPn2-0003cR-UX for bug-gnu-emacs@gnu.org; Mon, 29 Jun 2009 18:57:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MLPmx-0003c7-At for bug-gnu-emacs@gnu.org; Mon, 29 Jun 2009 18:57:31 -0400 Original-Received: from [199.232.76.173] (port=33851 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MLPmx-0003c4-4q for bug-gnu-emacs@gnu.org; Mon, 29 Jun 2009 18:57:27 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:34595) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MLPmw-0007B5-K8 for bug-gnu-emacs@gnu.org; Mon, 29 Jun 2009 18:57:26 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5TMvOvN024393; Mon, 29 Jun 2009 15:57:24 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n5TMe5VP021797; Mon, 29 Jun 2009 15:40:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Teemu Likonen Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 29 Jun 2009 22:40:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3712 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3712-submit@emacsbugs.donarmstrong.com id=B3712.124631471721000 (code B ref 3712); Mon, 29 Jun 2009 22:40:04 +0000 Original-Received: (at 3712) by emacsbugs.donarmstrong.com; 29 Jun 2009 22:31:57 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from kirsi1.inet.fi (mta-out.inet.fi [195.156.147.13]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5TMVpxU020995 for <3712@emacsbugs.donarmstrong.com>; Mon, 29 Jun 2009 15:31:53 -0700 Original-Received: from mithlond.arda.local (80.220.180.181) by kirsi1.inet.fi (8.5.014) id 49F6055A0246797B; Tue, 30 Jun 2009 01:31:51 +0300 Original-Received: from dtw by mithlond.arda.local with local (Exim 4.69) (envelope-from ) id 1MLPOA-00025i-3P; Tue, 30 Jun 2009 01:31:50 +0300 In-Reply-To: (Teemu Likonen's message of "Tue, 30 Jun 2009 01:01:21 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Mon, 29 Jun 2009 18:57:31 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:29094 Archived-At: On 2009-06-30 01:01 (+0300), Teemu Likonen wrote: > On 2009-06-29 23:15 (+0200), Michael Albinus wrote: > >>> On 2009-06-29 18:16 (+0300), Teemu Likonen wrote: >>>> When method /su: or /sudo: is used to _create_ a file the file's >>>> permission will be set to -rwxrwxrwx (777), [...] >> >> I've committed a fix, to both the trunk and the 23.1 branch. > > Thanks. Otherwise OK but I don't like the fact that it gives executable > bits (-rwxr-xr-x) by default. Normal behavior for new files is to drop > umask bits _and_ executable bits. Executable must be added explicitly. And when editing existing files it should obviously respect the bits that the file already has. Currently -- even with this fix -- tramp is adding "x" bits at some point because "backup by rename" moves old version out of the way and new is created with -rwxr-xr-x bits.