[comp.emacs] Problem with saving precious files in GNU Emacs on Apollos

Ram-Ashwin@cs.yale.edu (Ashwin Ram) (05/10/89)

GNU Emacs 18.52.26 of Thu May  4 1989 on leo.ring.cs.yale.edu (Domain/OS)

Correct me if I'm wrong, but as far as I can see...

If file-precious-flag = t, basic-save-buffer (in files.el) renames the file to a
temporary name, writes the buffer into a new file, and then calls set-file-modes
to set the mode of the new file back to the mode of the original file.

But set-file-modes (in fileio.c) on the Apollos does nothing unless
unix_protection_enabled is true.  But this is set to false if
select-apollo-protection-style is done (in apollo.c).

So if you try to save a precious file, the saved file will lose its original ACL
(or mode) and acquire a new ACL based on the default ACL of the directory that
it's in.

As far as I can see, therefore, functions that depend on set-file-modes will not
work correctly if (select-apollo-protection-style t) is done.  This includes the
saving of precious files, which is where I noticed the problem.

I think this is a bug, though the dependencies are so complex that I may well
have missed something.  If this is indeed a bug, does anyone have a fix?
Unfortunately, (set-apollo-protection-style nil) has its own problems since then
Emacs does not know about default ACLs for newly created files, and so is not
really a reasonable solution.

Thanks,

-- Ashwin.

ARPA:    Ram-Ashwin@cs.yale.edu
UUCP:    {decvax,ucbvax,harvard,cmcl2,...}!yale!Ram-Ashwin
BITNET:  Ram@yalecs