From 885583ebe3fea9eb8546bfb0614231d8f41e7979 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 17 Sep 2009 03:02:57 +0200 Subject: tar: do chown, not lchown to restore mode (compat) Signed-off-by: Denys Vlasenko --- archival/libunarchive/data_extract_all.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'archival/libunarchive') 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 - -- cgit v1.2.3