emacs-devel
[Top][All Lists]
Advanced

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

Re: master fails to build on FreeBSD when ACL support is on


From: Paul Eggert
Subject: Re: master fails to build on FreeBSD when ACL support is on
Date: Mon, 22 Jan 2018 10:50:59 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 01/22/2018 09:41 AM, Eli Zaretskii wrote:
Why do we need to inform the callers that ACL setting failed

Because they invoked copy-file with a non-nil preserve-permissions flag, and copy-file cannot preserve the permissions as requested. It's the same reason copy-file signals an error when invoked with a non-nil keep-time flag and when it cannot keep the time on the output file. If copy-file did not report an error, users would be lulled into thinking that the destination has the same permissions as the source when copy-file succeeds, even though that's not the case.

There is some precedent for ignoring failure, as copy-file does ignore chown failure when the preserve-uid-gid flag is used. However, this behavior is documented as a specific exception to the general rule that copy-file signals failures.

One way to move forward would be to change copy-file to have a three-way result, as set-file-acl does. That is, it could return t if successful, nil if mildly unsuccessful, and signal an error if severely unsuccessful. Failure to preserve UID and GID would be considered mild. Perhaps failure to preserve permissions could be considered mild, too, since it's no more security-relevant than UID failure is.




reply via email to

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