← Commit list

9daa877d6

Denys Vlasenko
Denys Vlasenko
2021-01-01
SUCCESS Duration: 151s

Subject

tar: add TODO about a bug with non-writable directories on extract

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

archival/libarchive/data_extract_all.c+4 -0
@@ -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 */
scripts/bb_release+1 -0
@@ -8,6 +8,7 @@
#svn co svn://busybox.net/trunk/busybox
cd busybox || { echo "cd busybox failed"; exit 1; }
+chmod -Rc u+w,a+rX,go-w .
make release || { echo "make release failed"; exit 1; }
cd ..