summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-04-17 10:07:49 +0300
committerTimo Teräs <timo.teras@iki.fi>2015-04-17 10:07:49 +0300
commit820098d6adc302bfa920243bcbe6e8ff8c40c582 (patch)
treef474354bedde7810044667f5fdfc565996498b24
parent90e760339e4cbc57b0e6c37ff994e4aa1ba0db13 (diff)
downloadapk-tools-820098d6adc302bfa920243bcbe6e8ff8c40c582.tar.gz
apk-tools-820098d6adc302bfa920243bcbe6e8ff8c40c582.tar.bz2
apk-tools-820098d6adc302bfa920243bcbe6e8ff8c40c582.tar.xz
apk-tools-820098d6adc302bfa920243bcbe6e8ff8c40c582.zip
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)
-rw-r--r--src/archive.c2
-rw-r--r--src/audit.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/archive.c b/src/archive.c
index 63eb48f..dab9f4d 100644
--- a/src/archive.c
+++ b/src/archive.c
@@ -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) {
diff --git a/src/audit.c b/src/audit.c
index 6655cb3..0e57a61 100644
--- a/src/audit.c
+++ b/src/audit.c
@@ -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)