summaryrefslogtreecommitdiffhomepage
path: root/archival/libarchive
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2021-01-01 13:34:25 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2021-01-01 13:34:25 +0100
commit9daa877d6bdc8dd470ffd86839550c54957eac73 (patch)
treefa3e2fac687674546677ca27d8592a669fc6b384 /archival/libarchive
parent49fd1d69babc6945175068e8fe4c85713fe5fcdb (diff)
tar: add TODO about a bug with non-writable directories on extract
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/libarchive')
-rw-r--r--archival/libarchive/data_extract_all.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/archival/libarchive/data_extract_all.c b/archival/libarchive/data_extract_all.c
index 3142405a3..049c2c156 100644
--- a/archival/libarchive/data_extract_all.c
+++ b/archival/libarchive/data_extract_all.c
@@ -159,6 +159,10 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
break;
}
case S_IFDIR:
+//TODO: this causes problems if tarball contains a r-xr-xr-x directory:
+// we create this directory, and then fail to create files inside it
+// (if tar xf isn't run as root).
+// GNU tar works around this by chmod-ing directories *after* all files are extracted.
res = mkdir(dst_name, file_header->mode);
if ((res != 0)
&& (errno != EISDIR) /* btw, Linux doesn't return this */