aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-09-11 08:32:40 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-09-11 08:32:40 +0000
commit65ac20efeed936d73eb684a6890c0850e881585c (patch)
tree747015fe95950a8bf64dc14769aca5d5452590e0 /archival
parentb109c986c6fca6bfdfe049e10a7b253cb1468895 (diff)
downloadbusybox-w32-65ac20efeed936d73eb684a6890c0850e881585c.tar.gz
busybox-w32-65ac20efeed936d73eb684a6890c0850e881585c.tar.bz2
busybox-w32-65ac20efeed936d73eb684a6890c0850e881585c.zip
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). git-svn-id: svn://busybox.net/trunk/busybox@7463 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'archival')
-rw-r--r--archival/libunarchive/data_extract_all.c2
1 files changed, 1 insertions, 1 deletions
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)
112 } 112 }
113 } 113 }
114 114
115 chmod(file_header->name, file_header->mode);
116 chown(file_header->name, file_header->uid, file_header->gid); 115 chown(file_header->name, file_header->uid, file_header->gid);
116 chmod(file_header->name, file_header->mode);
117 117
118 if (archive_handle->flags & ARCHIVE_PRESERVE_DATE) { 118 if (archive_handle->flags & ARCHIVE_PRESERVE_DATE) {
119 struct utimbuf t; 119 struct utimbuf t;