Add support for preserving ACL entries of files.
authorRomain Francoise <romain@orebokech.com>
Sun, 16 Dec 2012 18:22:27 +0000 (19:22 +0100)
committerRomain Francoise <romain@orebokech.com>
Sun, 16 Dec 2012 18:22:27 +0000 (19:22 +0100)
commit7c3d167f48d6262ee4e5512aa50a07ee96bc1509
tree9d4c24c1c97ae0cb1763e51d6ab8e808283fb09b
parenta5e9740d8ecfd471ecbc1f02980b83b003c1a469
Add support for preserving ACL entries of files.

* configure.ac (acl): New option.
(HAVE_POSIX_ACL): Test for POSIX ACL support.  This is typically
provided by libacl on GNU/Linux.

* fileio.c (Ffile_acl, Fset_file_acl): New functions.
(Fcopy_file): Change last arg to `preserve_extended_attributes'
and copy ACL entries of file in addition to SELinux context if
set.
(syms_of_fileio): Add `file-acl' and `set-file-acl'.

* Makefile.in (LIBACL_LIBS): New macro.
(LIBES): Use it.

* files.el (file-extended-attributes)
(set-file-extended-attributes): New functions.
(backup-buffer): Use them to handle both SELinux context and ACL
entries.
(backup-buffer-copy): Work with an alist of extended attributes,
rather than an SELinux context.
(basic-save-buffer-2): Ditto.

* files.texi (File Attributes): Document ACL support and new
`file-acl' function.
(Changing Files): Mention argument name change of `copy-file' and
document new function `set-file-acl'.
ChangeLog
configure.ac
doc/lispref/ChangeLog
doc/lispref/files.texi
etc/NEWS
lisp/ChangeLog
lisp/files.el
src/ChangeLog
src/Makefile.in
src/fileio.c