]> Savannah Git Hosting - gnulib.git/commit
acl-permissions: Fix on FreeBSD
authorAndreas Gruenbacher <andreas.gruenbacher@gmail.com>
Tue, 30 Jun 2015 19:09:28 +0000 (21:09 +0200)
committerAndreas Gruenbacher <andreas.gruenbacher@gmail.com>
Sun, 5 Jul 2015 20:45:52 +0000 (22:45 +0200)
commitda97e2a534a945ad550fab0626657648b235a6aa
treee33682e92f1ac7a2ec10c11bfdfc7264dbc22d84
parent999724c0010ab3fb3a40fe11587df797021ed875
acl-permissions: Fix on FreeBSD

When a directory doesn't have an ACL_TYPE_DEFAULT acl, acl_get_file will return
an empty acl, but when trying to set that acl, FreeBSD's acl_set_file will fail
with errno == EINVAL.  Instead, FreeBSD expects acl_delete_def_file to be used.
* lib/acl-internal.c (acl_default_nontrivial): Recognize empty default acls.
* lib/set-permissions.c (set_acls): Avoid calling acl_set_file for empty
ACL_TYPE_DEFAULT acls.
lib/acl-internal.c
lib/acl-internal.h
lib/set-permissions.c