From 2fdba24620314729941bb30e6dd987dd1a1f1709 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 11 Sep 2003 08:32:40 +0000 Subject: Marc A. Lehmann writes: The tar -x command in busybox does not restore the file mode correctly. The reason is most probably this code in archival/libunarachive/data_extract_all.c: chmod(file_header->name, file_header->mode); chown(file_header->name, file_header->uid, file_header->gid); chown clears the set*id bits (on current versions of linux :). Flipping the order around fixes the problem. (tested with 1.00pre3 from cvs). --- archival/libunarchive/data_extract_all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archival/libunarchive') diff --git a/archival/libunarchive/data_extract_all.c b/archival/libunarchive/data_extract_all.c index 05bd2f03b..7349339d3 100644 --- a/archival/libunarchive/data_extract_all.c +++ b/archival/libunarchive/data_extract_all.c @@ -112,8 +112,8 @@ extern void data_extract_all(archive_handle_t *archive_handle) } } - chmod(file_header->name, file_header->mode); chown(file_header->name, file_header->uid, file_header->gid); + chmod(file_header->name, file_header->mode); if (archive_handle->flags & ARCHIVE_PRESERVE_DATE) { struct utimbuf t; -- cgit v1.2.3