From: Tim Kientzle Date: Tue, 29 Jul 2008 20:27:19 +0000 (-0400) Subject: Preserve all permissions by default. X-Git-Tag: v2.6.0~123 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fa66a06c3c4c73587d2eb5125d449bcccd9d7323;p=thirdparty%2Flibarchive.git Preserve all permissions by default. In particular, this fixes the curiosity that cpio -dumpl would apply umask to the new dirs (which got created) but not to the new files (which are just links to the existing files). Thanks to Kris Kennaway for reminding me about this one. SVN-Revision: 169 --- diff --git a/cpio/cpio.c b/cpio/cpio.c index e758dffe3..b889a16fa 100644 --- a/cpio/cpio.c +++ b/cpio/cpio.c @@ -111,6 +111,7 @@ main(int argc, char *argv[]) cpio->extract_flags |= ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER; cpio->extract_flags |= ARCHIVE_EXTRACT_SECURE_SYMLINKS; cpio->extract_flags |= ARCHIVE_EXTRACT_SECURE_NODOTDOT; + cpio->extract_flags |= ARCHIVE_EXTRACT_PERM; if (geteuid() == 0) cpio->extract_flags |= ARCHIVE_EXTRACT_OWNER; cpio->bytes_per_block = 512;