archive: honor tar.umask even for pax headers
commit10f343ea814f5c18a0913997904ee11cd9b7da24
authorbrian m. carlson <sandals@crustytoothpaste.net>
Sun, 3 Aug 2014 03:02:03 +0000 (3 03:02 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 4 Aug 2014 18:39:11 +0000 (4 11:39 -0700)
tree9152810c20e2c9a5453f2c69c35904826030be55
parente6aaa393478bf3ee9f4cde8d82cd258c034cd335
archive: honor tar.umask even for pax headers

git archive's tar format uses extended pax headers to encode metadata
into the archive.  Most tar implementations correctly treat these as
metadata, but some that do not understand the pax format extract these
as files instead.  Apply the tar.umask setting to these entries to
prevent tampering by other users.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
archive-tar.c
t/t5004-archive-corner-cases.sh