From: Martin Matuska Date: Sat, 18 Feb 2017 16:06:24 +0000 (+0100) Subject: Test default ACLs against a nested directory. This verifies path handling. X-Git-Tag: v3.3.0~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0df025da2cb0bc532f415ea3226b80c0989b899;p=thirdparty%2Flibarchive.git Test default ACLs against a nested directory. This verifies path handling. --- 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);