]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
On systems that can't read symlink ACLs, don't read any ACL.
authorTim Kientzle <kientzle@gmail.com>
Fri, 12 Mar 2010 05:54:52 +0000 (00:54 -0500)
committerTim Kientzle <kientzle@gmail.com>
Fri, 12 Mar 2010 05:54:52 +0000 (00:54 -0500)
As reported in Issue 75, this fixes a problem on Fedora 12 with ACLs
being incorrectly reported on symlinks.

Thanks to: rransom.8774

SVN-Revision: 2025

libarchive/archive_read_disk_entry_from_file.c

index 1ae236bfd56d78d737a82adfea7c6e850301f47a..f5f9e0ed77ec62490c79ccc43d937a5b06d08dd3 100644 (file)
@@ -243,6 +243,12 @@ setup_acls_posix1e(struct archive_read_disk *a,
 #if HAVE_ACL_GET_LINK_NP
        else if (!a->follow_symlinks)
                acl = acl_get_link_np(accpath, ACL_TYPE_ACCESS);
+#else
+       else if ((!a->follow_symlinks)
+           && (archive_entry_filetype(entry) == AE_IFLNK)))
+               /* We can't get the ACL of a symlink, so we assume it can't
+                  have one. */
+               acl = NULL;
 #endif
        else
                acl = acl_get_file(accpath, ACL_TYPE_ACCESS);