From: Martin Matuska Date: Tue, 13 Dec 2016 12:35:27 +0000 (+0100) Subject: Don't check for duplicates when adding NFSv4 ACL entries X-Git-Tag: v3.3.0~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c61966d0956c264d439cb53cbb65c4f552702f0d;p=thirdparty%2Flibarchive.git Don't check for duplicates when adding NFSv4 ACL entries --- diff --git a/libarchive/archive_acl.c b/libarchive/archive_acl.c index ff5c90492..3653d6fc7 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;