disable xattrs on symlinks for now

there's no nice syscall to manipulate xattrs with atfd and
or open the symlink without dereferencing it (and having fd
that we can do xattrs with)
cute-signatures
Timo Teräs 2015-04-17 10:07:49 +03:00
parent 90e760339e
commit 820098d6ad
2 changed files with 2 additions and 2 deletions

View File

@ -476,7 +476,7 @@ int apk_archive_entry_extract(int atfd, const struct apk_file_info *ae,
}
/* extract xattrs */
if (ae->xattrs && ae->xattrs->num) {
if (!S_ISLNK(ae->mode) && ae->xattrs && ae->xattrs->num) {
r = 0;
fd = openat(atfd, fn, O_RDWR);
if (fd >= 0) {

View File

@ -110,7 +110,7 @@ static int audit_file(struct audit_ctx *actx,
if (dbf->csum.type != APK_CHECKSUM_NONE &&
apk_checksum_compare(&fi.csum, &dbf->csum) != 0)
rv = 'U';
else if (!dbf->diri->pkg->ipkg->broken_xattr &&
else if (!S_ISLNK(fi.mode) && !dbf->diri->pkg->ipkg->broken_xattr &&
apk_checksum_compare(&fi.xattr_csum, &dbf->acl->xattr_csum) != 0)
rv = 'x';
else if (S_ISLNK(fi.mode) && dbf->csum.type == APK_CHECKSUM_NONE)