[strip-nondeterminism] 01/01: zip: make sure we have permissions on extracted file

Chris Lamb chris at chris-lamb.co.uk
Wed May 10 13:36:44 UTC 2017


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository strip-nondeterminism.

commit e2733711a56b6c9a4620d0c8181453bd5bfaf2f4
Author: Bernhard M. Wiedemann <bwiedemann at suse.de>
Date:   Wed May 10 15:21:28 2017 +0200

    zip: make sure we have permissions on extracted file
    
    an imageconversion.jar had
    -rw-rw-rw-  2.0 unx     3215 b- defN 99-Sep-06 10:58 com/ibm/imageconversion/IndexColorTable.class
    ?---------  2.0 unx     7004 b- defN 99-Sep-06 10:58 META-INF/MANIFEST.MF
    
    and thus generated an error like
    strip-nondeterminism: ./imageconversion.jar: Unable to open /tmp/3F14xYUtK0/member for reading: Permission denied at /usr/lib/perl5/vendor_perl/5.24.0/File/StripNondeterminism/handlers/jar.pm line 46.
---
 lib/File/StripNondeterminism/handlers/zip.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/File/StripNondeterminism/handlers/zip.pm b/lib/File/StripNondeterminism/handlers/zip.pm
index 6bbce66..c25ec39 100644
--- a/lib/File/StripNondeterminism/handlers/zip.pm
+++ b/lib/File/StripNondeterminism/handlers/zip.pm
@@ -56,6 +56,7 @@ sub normalize_member {
 	my $filename = "$tempdir/member";
 	my $original_size = $member->compressedSize();
 	$member->extractToFileNamed($filename);
+	chmod(0600, $filename);
 	$member->{'compressedSize'} = $original_size
 	  ; # Work around https://github.com/redhotpenguin/perl-Archive-Zip/issues/11
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/strip-nondeterminism.git



More information about the Reproducible-commits mailing list