← Commit list

ebad0294c

Denis Vlasenko
Denis Vlasenko
2008-10-24
FAILED Duration: 29s

Subject

tar: fix bug 3844: non-root tar does not preserve perms

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/tar.c+4 -0
@@ -818,6 +818,10 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
| ARCHIVE_PRESERVE_DATE
| ARCHIVE_EXTRACT_UNCONDITIONAL;
+ /* Apparently only root's tar preserves parms (see bug 3844) */
+ if (getuid() != 0)
+ tar_handle->ah_flags |= ARCHIVE_NOPRESERVE_PERM;
+
/* Prepend '-' to the first argument if required */
opt_complementary = "--:" // first arg is options
"tt:vv:" // count -t,-v