From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode Date: Sun, 19 Mar 2023 14:19:47 +0200 Message-ID: <83sfe19bmk.fsf@gnu.org> References: <87v8iynl5c.fsf@ledu-giraud.fr> <83h6uiawvv.fsf@gnu.org> <87r0tlnbtz.fsf@ledu-giraud.fr> <83bkkpc2x6.fsf@gnu.org> <83a609c2q7.fsf@gnu.org> <87ilexn9tc.fsf@ledu-giraud.fr> <838rftbzj3.fsf@gnu.org> <837cvdbykw.fsf@gnu.org> <87edplm0ft.fsf@ledu-giraud.fr> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10850"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62260@debbugs.gnu.org To: Manuel Giraud , Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 19 13:20:22 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pds1N-0002ZM-CF for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 Mar 2023 13:20:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pds1D-0007mw-TF; Sun, 19 Mar 2023 08:20:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pds15-0007m0-EO for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2023 08:20:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pds14-00035a-Vz for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2023 08:20:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pds14-0001JG-QI for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2023 08:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Mar 2023 12:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62260 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 62260-submit@debbugs.gnu.org id=B62260.16792283924987 (code B ref 62260); Sun, 19 Mar 2023 12:20:02 +0000 Original-Received: (at 62260) by debbugs.gnu.org; 19 Mar 2023 12:19:52 +0000 Original-Received: from localhost ([127.0.0.1]:49595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pds0t-0001IM-QL for submit@debbugs.gnu.org; Sun, 19 Mar 2023 08:19:52 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pds0r-0001I7-LD for 62260@debbugs.gnu.org; Sun, 19 Mar 2023 08:19:50 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pds0l-00032J-16; Sun, 19 Mar 2023 08:19:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=HuS8oi/QKmGnex3rJ8cz5PSbDln15sWY0lHPou5ajXU=; b=oYutMsRlj0xB HBk/w4Q677h2OBtZ2Kb0dnBQva/l4lRWkJF3XTmAJxL1QP3SJ0NJgO9sXgHEg7AttIezrfcw3Ea0k oKkNVfvzdD7y8MUiwSHyk4O0N16QaGERRG8c4ihleRYL6KgrkMXPVvRph8fp3QMdxVxS4fZ2fRpqC 3KM8VS/bT4wgXxY+v1ckuPuMChFVZDcuWsDR6OTT2hUmPjranN23z3nxoSaNkLBcFwn9fFO3BXEGz xo8rlAQb2Ukzzc2q5KOE/hyhoutLofi8gZYq+JGNFQKQkwZrzKhzpZfiV43j6wp0GfOiQ0WiUihO1 rGtXDpDr2QUY10wMgNFztA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pds0k-0004LO-DS; Sun, 19 Mar 2023 08:19:42 -0400 In-Reply-To: <87edplm0ft.fsf@ledu-giraud.fr> (message from Manuel Giraud on Sun, 19 Mar 2023 12:43:02 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:258231 Archived-At: > From: Manuel Giraud > Cc: 62260@debbugs.gnu.org > Date: Sun, 19 Mar 2023 12:43:02 +0100 > > Eli Zaretskii writes: > > > More generally: what problems are you trying to solve here? If this > > code causes some problems, please describe them, and let's see whether > > and how we should fix them. > > You're right. I should have start from here. So it all start with a > recurring message I get from TRAMP whenever I access a root file (via > sudo method) for the first time. It asks: > > "Autosave file on local temporary directory, do you want to continue?" > > I answer "yes" but it seems that it can potentially leak root data > through auto-save files. Looking at the code that asks this question > (tramp.el:6528), I see that I can set > 'tramp-allow-unsafe-temporary-files' to t and I won't see the question > again... but the leakage is still possible. So I guess what I want is > an option to stop auto-save entirely in those cases. > > >From there, I've looked at how auto-save work and I ask myself: "maybe > instead of such an option, I could limit others rights on auto-save > files". And that's how I came up with this patch. So this is limited to Tramp and how it handles auto-saving? Adding Michael, in case he has ideas for how to solve this issue.