summaryrefslogtreecommitdiffhomepage
path: root/archival
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-09-17 03:02:57 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-09-17 03:02:57 +0200
commit885583ebe3fea9eb8546bfb0614231d8f41e7979 (patch)
treeb3e701cf4e981c1958ad8aecaaf9ef7f110cf7b6 /archival
parentd57d62686dac254e83fbc18f851c773ec16013d8 (diff)
tar: do chown, not lchown to restore mode (compat)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival')
-rw-r--r--archival/libunarchive/data_extract_all.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/archival/libunarchive/data_extract_all.c b/archival/libunarchive/data_extract_all.c
index 3e4a77de8..0d529a616 100644
--- a/archival/libunarchive/data_extract_all.c
+++ b/archival/libunarchive/data_extract_all.c
@@ -128,10 +128,11 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
struct group *grp = getgrnam(file_header->gname);
if (grp) gid = grp->gr_gid;
}
- lchown(file_header->name, uid, gid);
+ /* GNU tar 1.15.1 use chown, not lchown */
+ chown(file_header->name, uid, gid);
} else
#endif
- lchown(file_header->name, file_header->uid, file_header->gid);
+ chown(file_header->name, file_header->uid, file_header->gid);
}
if (!S_ISLNK(file_header->mode)) {
/* uclibc has no lchmod, glibc is even stranger -