Suppress ACL ops if configured with --disable-acl
Without this patch, some ACL operations were suppressed, but not all. * src/fileio.c [!USE_ACL]: Do not include sys/acl.h. (Ffile_acl, Fset_file_acl) [!USE_ACL]: Return nil in this case.
This commit is contained in:
parent
1a9dbf52d1
commit
0a289d38b5
1 changed files with 12 additions and 8 deletions
|
@ -36,7 +36,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
#include <selinux/context.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ACL_SET_FILE
|
||||
#if USE_ACL && defined HAVE_ACL_SET_FILE
|
||||
#include <sys/acl.h>
|
||||
#endif
|
||||
|
||||
|
@ -2937,6 +2937,7 @@ Return nil if file does not exist or is not accessible, or if Emacs
|
|||
was unable to determine the ACL entries. */)
|
||||
(Lisp_Object filename)
|
||||
{
|
||||
#if USE_ACL
|
||||
Lisp_Object absname;
|
||||
Lisp_Object handler;
|
||||
# ifdef HAVE_ACL_SET_FILE
|
||||
|
@ -2976,6 +2977,7 @@ was unable to determine the ACL entries. */)
|
|||
acl_free (acl);
|
||||
|
||||
return acl_string;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
return Qnil;
|
||||
|
@ -2993,6 +2995,7 @@ Setting ACL for local files requires Emacs to be built with ACL
|
|||
support. */)
|
||||
(Lisp_Object filename, Lisp_Object acl_string)
|
||||
{
|
||||
#if USE_ACL
|
||||
Lisp_Object absname;
|
||||
Lisp_Object handler;
|
||||
# ifdef HAVE_ACL_SET_FILE
|
||||
|
@ -3030,6 +3033,7 @@ support. */)
|
|||
acl_free (acl);
|
||||
return fail ? Qnil : Qt;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
return Qnil;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue