]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Merge r2025 from trunk: Don't dereference symlinks on Linux when reading ACLs.
authorTim Kientzle <kientzle@gmail.com>
Sat, 13 Mar 2010 06:21:53 +0000 (01:21 -0500)
committerTim Kientzle <kientzle@gmail.com>
Sat, 13 Mar 2010 06:21:53 +0000 (01:21 -0500)
SVN-Revision: 2027

libarchive/archive_read_disk_entry_from_file.c

index 80e1d951d1533046dd196031776a442f93ab04b2..c65f115b7d24421f0b975ab75c1af3a0c3cad293 100644 (file)
@@ -208,6 +208,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);