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: Sat, 18 Mar 2023 22:00:32 +0200 Message-ID: <838rftbzj3.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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28387"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62260@debbugs.gnu.org To: Manuel Giraud Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 18 21:01:18 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 1pdcju-0007Do-21 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Mar 2023 21:01:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pdcjg-0003hK-ST; Sat, 18 Mar 2023 16:01:05 -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 1pdcje-0003gl-Rf for bug-gnu-emacs@gnu.org; Sat, 18 Mar 2023 16:01:02 -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 1pdcje-0006OW-Fb for bug-gnu-emacs@gnu.org; Sat, 18 Mar 2023 16:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pdcje-0005wd-4g for bug-gnu-emacs@gnu.org; Sat, 18 Mar 2023 16:01: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: Sat, 18 Mar 2023 20:01: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.167916964022809 (code B ref 62260); Sat, 18 Mar 2023 20:01:02 +0000 Original-Received: (at 62260) by debbugs.gnu.org; 18 Mar 2023 20:00:40 +0000 Original-Received: from localhost ([127.0.0.1]:49098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdcjH-0005vp-Ph for submit@debbugs.gnu.org; Sat, 18 Mar 2023 16:00:40 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdcjG-0005vd-1f for 62260@debbugs.gnu.org; Sat, 18 Mar 2023 16:00:39 -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 1pdcjA-0006Ls-69; Sat, 18 Mar 2023 16:00:32 -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=+MaZKr7kWBgFB6Rs5rv2NjZlG2DNlqPVipffjDhqLEk=; b=A/2fpx5lzChL LDWe2j0nQCFBXSs/gDQY+j8HIVNdFEtxmdJCIK3lxeyi7rhYfedOstL/VEoVNEH/dnqanSIjNRSAx lnWOI9f324PuCuWe2oHEgNsgS7M5RM1MakK/M4TombeKyDwrxdd7GWEgBZQD83GKfUXNfE0NIlYfn EElbiMVufrzzmwQ0zVMUDorXP59jw1KVE13ekup545M1gxK0c5JXw+gan9H8/agAxF8alUHF1pY38 qetJG0Ic8H/EWSqeKcVhx4RpiY5Cz9ADuTz1qK7MBxNOMyzkecd21O7P8yoq3IcbvVH5XdFmIiwYO 5JBuSx+RwhnBCW5ZDGyjYg==; 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 1pdcj6-00010M-Rq; Sat, 18 Mar 2023 16:00:30 -0400 In-Reply-To: <87ilexn9tc.fsf@ledu-giraud.fr> (message from Manuel Giraud on Sat, 18 Mar 2023 20:22:55 +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:258212 Archived-At: > From: Manuel Giraud > Cc: 62260@debbugs.gnu.org > Date: Sat, 18 Mar 2023 20:22:55 +0100 > > Eli Zaretskii writes: > > >> Did you try a different user? > > > > Actually, the right question is: what exactly did you try? As you can > > see from the code, 0666 value is used only for buffers that don't > > visit files. Did you try with such a buffer, and what exactly did you > > try? > > I didn't with a buffer not visiting a file. I have tried with a file in > /tmp that by default on my system is created with mode 0644. Then I > write something into this file and do 'M-x do-auto-save'. > > With this patch, the /tmp directory now contains an auto-save file with > mode 0600. When a buffer visits a file, its auto-save file should have the same mode bits as the file itself (modulo your umask). I see no need to affect that part in any case. If the file itself is not private, why should its auto-save file be private? Also, there's auto-save-visited-mode.