From a0df025da2cb0bc532f415ea3226b80c0989b899 Mon Sep 17 00:00:00 2001 From: Martin Matuska Date: Sat, 18 Feb 2017 17:06:24 +0100 Subject: [PATCH] Test default ACLs against a nested directory. This verifies path handling. --- libarchive/test/test_acl_platform_posix1e.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libarchive/test/test_acl_platform_posix1e.c b/libarchive/test/test_acl_platform_posix1e.c index 1d55a33eb..5d1732a51 100644 --- a/libarchive/test/test_acl_platform_posix1e.c +++ b/libarchive/test/test_acl_platform_posix1e.c @@ -571,8 +571,8 @@ DEFINE_TEST(test_acl_platform_posix1e_read) assertEqualInt(0, n); close(fd); - /* Create directory d2 with default ACLs */ - assertMakeDir("d2", 0755); + /* Create nested directory d2 with default ACLs */ + assertMakeDir("d/d2", 0755); #if HAVE_SUN_ACL acl3_text = "user::rwx," @@ -604,10 +604,10 @@ DEFINE_TEST(test_acl_platform_posix1e_read) #if HAVE_SUN_ACL func = "acl_set()"; - n = acl_set("d2", acl3); + n = acl_set("d/d2", acl3); #else func = "acl_set_file()"; - n = acl_set_file("d2", ACL_TYPE_DEFAULT, acl3); + n = acl_set_file("d/d2", ACL_TYPE_DEFAULT, acl3); #endif acl_free(acl3); @@ -640,7 +640,7 @@ DEFINE_TEST(test_acl_platform_posix1e_read) acl_text = archive_entry_acl_to_text(ae, NULL, flags); assertEqualString(acl_text, acl2_text); free(acl_text); - } else if (strcmp(archive_entry_pathname(ae), "./d2") == 0) { + } else if (strcmp(archive_entry_pathname(ae), "./d/d2") == 0) { acl_text = archive_entry_acl_to_text(ae, NULL, dflags); assertEqualString(acl_text, acl3_text); free(acl_text); -- 2.47.2