Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uwm.edu!linac!att!ucbvax!sequent.cc.hull.ac.uk!sm2 From: sm2@sequent.cc.hull.ac.uk (Simon Marshall) Newsgroups: comp.emacs Subject: Emacs Auto-Save Security Keywords: Key, Quay, Qui Message-ID: <11564.9105201105@seq.hull.ac.uk> Date: 20 May 91 11:05:26 GMT Sender: usenet@ucbvax.BERKELEY.EDU Lines: 31 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