[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Privacy of autosave files
From: |
Per Starbck |
Subject: |
Privacy of autosave files |
Date: |
Wed, 17 Aug 2005 15:26:26 +0200 |
In GNU Emacs 22.0.50.4 (i686-pc-linux-gnu, GTK+ Version 2.6.7)
I think autosave files for buffers without a file should be more
protected.
1. C-x b newbuffer RET
2. x
3. M-x auto-save-mode RET
[Auto-save on (in this buffer)]
4. M-x do-auto-save RET
Now in the current directory I get a file "#newbuffer#3129957w#"
which is "-rw-rw-r--". (My umask is 0002.)
I would like that to be -rw------- instead.
Rationale: Autosave files for buffers that correspond to files
get the same protection as those files. The users have decided how
much or little protection they want for that file, so it's natural
that the data for the coming new version will have the same
protection.
But what users write in emacs which isn't saved in a file is normally
not visible to others, including text in "non-filed" buffers, so I
think the current behaviour might surprise users. A surprising
behaviour regarding file permission can lead to privacy issues.
In emacs 21.4 I fixed this with
--- emacs-21.2.orig/src/fileio.c
+++ emacs-21.2/src/fileio.c
@@ -5421,7 +5421,7 @@
/* But make sure we can overwrite it later! */
auto_save_mode_bits = st.st_mode | 0600;
else
- auto_save_mode_bits = 0666;
+ auto_save_mode_bits = 0600;
return
Fwrite_region (Qnil, Qnil,
(I'm reporting it for emacs 22 instead since I started with checking
if the issue is still there.)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Privacy of autosave files,
Per Starbck <=