summaryrefslogtreecommitdiff
path: root/libarchive/archive_acl.c
diff options
context:
space:
mode:
authorMartin Matuska <martin@matuska.org>2016-12-13 13:35:27 +0100
committerMartin Matuska <martin@matuska.org>2016-12-13 13:38:20 +0100
commitc61966d0956c264d439cb53cbb65c4f552702f0d (patch)
treeb5d9eeb5c8d7ad658c71d2087e402e841dc4034e /libarchive/archive_acl.c
parent54546be8a7a2e69738247d68f4f6c253430a3d6f (diff)
downloadlibarchive-c61966d0956c264d439cb53cbb65c4f552702f0d.tar.gz
Don't check for duplicates when adding NFSv4 ACL entries
Diffstat (limited to 'libarchive/archive_acl.c')
-rw-r--r--libarchive/archive_acl.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libarchive/archive_acl.c b/libarchive/archive_acl.c
index ff5c9049..3653d6fc 100644
--- a/libarchive/archive_acl.c
+++ b/libarchive/archive_acl.c
@@ -280,11 +280,17 @@ acl_new_entry(struct archive_acl *acl,
acl->acl_text = NULL;
}
- /* If there's a matching entry already in the list, overwrite it. */
+ /*
+ * If there's a matching entry already in the list, overwrite it.
+ * NFSv4 entries may be repeated and are not overwritten.
+ *
+ * TODO: compare names of no id is provided (needs more rework)
+ */
ap = acl->acl_head;
aq = NULL;
while (ap != NULL) {
- if (ap->type == type && ap->tag == tag && ap->id == id) {
+ if (((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) == 0) &&
+ ap->type == type && ap->tag == tag && ap->id == id) {
if (id != -1 || (tag != ARCHIVE_ENTRY_ACL_USER &&
tag != ARCHIVE_ENTRY_ACL_GROUP)) {
ap->permset = permset;