svn commit: trunk/busybox/archival
vda at busybox.net
vda at busybox.net
Fri Oct 24 23:47:38 UTC 2008
Author: vda
Date: 2008-10-24 16:47:38 -0700 (Fri, 24 Oct 2008)
New Revision: 23783
Log:
tar: fix bug 3844: non-root tar does not preserve perms
Modified:
trunk/busybox/archival/tar.c
Changeset:
Modified: trunk/busybox/archival/tar.c
===================================================================
--- trunk/busybox/archival/tar.c 2008-10-24 22:43:27 UTC (rev 23782)
+++ trunk/busybox/archival/tar.c 2008-10-24 23:47:38 UTC (rev 23783)
@@ -818,6 +818,10 @@
| 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
More information about the busybox-cvs
mailing list