summaryrefslogtreecommitdiff
path: root/test_utils
diff options
context:
space:
mode:
authorMartin Matuska <martin@matuska.org>2017-03-07 00:50:12 +0100
committerMartin Matuska <martin@matuska.org>2017-03-07 11:36:40 +0100
commit4c3cda21663fa3dc42147c771a3b96b85e631c53 (patch)
tree859431007dfd0231bf4707540fcc83fc66c2fcd7 /test_utils
parentd73bdd2b66b6cd10981409203eb53f9de70ac951 (diff)
downloadlibarchive-4c3cda21663fa3dc42147c771a3b96b85e631c53.tar.gz
Darwin ACL: avoid using mbr_identifier_to_uuid()
Use mbr_uid_to_uuid() and mbr_gid_to_uuid() for backwards compatibility instead. These functions have been introduced together with membership.h. Fixes #882
Diffstat (limited to 'test_utils')
-rw-r--r--test_utils/test_common.h2
-rw-r--r--test_utils/test_main.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/test_utils/test_common.h b/test_utils/test_common.h
index 00780541..44215a35 100644
--- a/test_utils/test_common.h
+++ b/test_utils/test_common.h
@@ -135,7 +135,7 @@
#if HAVE_SYS_ACL_H && HAVE_ACL_CREATE_ENTRY && HAVE_ACL_INIT && HAVE_ACL_SET_FILE
#if HAVE_DECL_ACL_USER
#define HAVE_POSIX_ACL 1
-#elif HAVE_DECL_ACL_TYPE_EXTENDED
+#elif HAVE_DECL_ACL_TYPE_EXTENDED && HAVE_MEMBERSHIP_H
#define HAVE_DARWIN_ACL 1
#endif
#if HAVE_DECL_ACL_TYPE_NFS4
diff --git a/test_utils/test_main.c b/test_utils/test_main.c
index 86ab5f1a..5d0e287d 100644
--- a/test_utils/test_main.c
+++ b/test_utils/test_main.c
@@ -2605,8 +2605,8 @@ setTestAcl(const char *path)
failure("acl_set_permset() error: %s", strerror(errno));
if (assertEqualInt(r, 0) == 0)
goto testacl_free;
- r = mbr_identifier_to_uuid(ID_TYPE_UID, &uid, sizeof(uid_t), uuid);
- failure("mbr_identifier_to_uuid() error: %s", strerror(errno));
+ r = mbr_uid_to_uuid(uid, uuid);
+ failure("mbr_uid_to_uuid() error: %s", strerror(errno));
if (assertEqualInt(r, 0) == 0)
goto testacl_free;
r = acl_set_qualifier(aclent, uuid);