Article View: gnu.emacs.bug
Article #98541Emacs Auto-Save Security
From: Simon Marshall
Date: Fri, 17 May 1991 14:56
Date: Fri, 17 May 1991 14:56
31 lines
2312 bytes
2312 bytes
For Emacs 18.55.2 (and 18.51.15). This may have been changed in
later versions, and is not really a bug - it just maybe that it never
occurred to anyone before...
When Emacs auto-saves a buffer visiting a file (using a different
name), it uses the value of the file creation mask (typically given
by "umask" on Unix) for the auto-save file's permission bits, not the
permission bits of the file that the buffer is visiting.
Assuming that you're not the type who has umask 077 as the first
line in your ~/.cshrc file (but do those sort of people refuse to use
Emacs on principle anyway? ;-), and have something like umask 022,
any file you edit using Emacs which you have chosen to restrict
access to in some way is effectively unrestricted once an auto-save
is done. If root uses Emacs to edit an access-restricted file, s/he
better beware...
Auto-saving is done on some buffers that are not visiting a file
(*mail* being one such example), so it cannot get permission bits
that way. Also, you may tell Emacs to auto-save under the same name
anyway. However, when using a different name, it would be safer to
use the visited file's permission bits if the buffer is visiting one,
or a more cautious value. Are there any patches for this?
Simon.
_______________________________________________________________________________
Simon Marshall, Dept. of Computer Science, University of Hull, Hull HU6 7RX, UK
"``La la la la la la la la la'' means I love you."
EMAIL: S.Marshall@Hull.ac.uk UUCP: ..!ukc!hu-cs!sm
Telephone: +44 482 465951 (office) Fax: +44 482 466666
Technical Details
Message-ID:
<gnusenet452.9105171456@seq.hull.ac.uk>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!unreplyable!garbageShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,d653817a71703fb7,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1991-05-17 07:56:06 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!unreplyable!garbage From: sm2@sequent.cc.hull.ac.uk (Simon Marshall) Newsgroups: gnu.emacs.bug Subject: Emacs Auto-Save Security Keywords: Key, Quay, Qui Message-ID: <gnusenet452.9105171456@seq.hull.ac.uk> Date: 17 May 91 14:56:06 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 31 Approved: bug-gnu-emacs@prep.ai.mit.edu