emacs-devel
[Top][All Lists]
Advanced

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

Re: set-file-extended-attributes and backups


From: Paul Eggert
Subject: Re: set-file-extended-attributes and backups
Date: Fri, 21 Dec 2012 09:48:20 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 12/21/12 08:44, Eli Zaretskii wrote:
> How about if it tried to copy ACLs, and if that failed, attempted to
> copy the file modes?  That would DTRT if possible, and fall back on
> the pre-ACL method if not.

That could lead to security issues if the file modes are more
permissive than the ACLs.

Is there an easy way to test whether a file's ACLs could deny
access when the file's modes would allow it?  If so, Emacs could
follow your suggestion when that test says "no".  If not, Emacs
could fall back on a conservative approximation to that test.
The simplest conservative approximation that I can think of offhand
is to test whether a file has any nontrivial ACLs.

Whatever test Emacs uses, if the test says "yes" Emacs should
be more cautious: create a destination file with a restrictive
mode (e.g., -rw-------), copy the data, then attempt to copy the ACLs,
and if the ACL copy fails then Emacs should not attempt to change
the mode.



reply via email to

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