]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Preserve all permissions by default.
authorTim Kientzle <kientzle@gmail.com>
Tue, 29 Jul 2008 20:27:19 +0000 (16:27 -0400)
committerTim Kientzle <kientzle@gmail.com>
Tue, 29 Jul 2008 20:27:19 +0000 (16:27 -0400)
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

cpio/cpio.c

index e758dffe3b1232aa05c7ccb28391a49f16ab38d6..b889a16fa830f2d2feebea877e14cb59c386ae3b 100644 (file)
@@ -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;