diff options
Diffstat (limited to 'archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c')
-rw-r--r-- | archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c b/archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c index e3795dec0a4..c65f115b7d2 100644 --- a/archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c +++ b/archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c @@ -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); @@ -430,11 +436,11 @@ setup_xattrs(struct archive_read_disk *a, * to not include the system extattrs that hold ACLs; we handle * those separately. */ -int +static int setup_xattr(struct archive_read_disk *a, struct archive_entry *entry, int namespace, const char *name, const char *fullname, int fd); -int +static int setup_xattr(struct archive_read_disk *a, struct archive_entry *entry, int namespace, const char *name, const char *fullname, int fd) { |