bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode


From: Eli Zaretskii
Subject: bug#62260: 30.0.50; [PATCH] Restrict auto-save file mode
Date: Sat, 18 Mar 2023 22:00:32 +0200

> From: Manuel Giraud <manuel@ledu-giraud.fr>
> Cc: 62260@debbugs.gnu.org
> Date: Sat, 18 Mar 2023 20:22:55 +0100
> 
> Eli Zaretskii <eliz@gnu.org> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]