From: Tim Kientzle Date: Fri, 12 Mar 2010 05:54:52 +0000 (-0500) Subject: On systems that can't read symlink ACLs, don't read any ACL. X-Git-Tag: v3.0.0a~1157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a01523c1e11ddf94724ad9d7266fb5aec315114;p=thirdparty%2Flibarchive.git On systems that can't read symlink ACLs, don't read any ACL. 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 --- diff --git a/libarchive/archive_read_disk_entry_from_file.c b/libarchive/archive_read_disk_entry_from_file.c index 1ae236bfd..f5f9e0ed7 100644 --- a/libarchive/archive_read_disk_entry_from_file.c +++ b/libarchive/archive_read_disk_entry_from_file.c @@ -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);