Blame SOURCES/unzip-6.0-timestamp.patch

623fdc
From: "Steven M. Schweda" <sms@antinode.info>
623fdc
Subject: Do not ignore extra fields containing Unix Timestamps
623fdc
Bug-Debian: https://bugs.debian.org/842993
623fdc
X-Debian-version: 6.0-21
623fdc
623fdc
--- a/process.c
623fdc
+++ b/process.c
623fdc
@@ -2914,10 +2914,13 @@
623fdc
             break;
623fdc
 
623fdc
           case EF_IZUNIX2:
623fdc
-            if (have_new_type_eb == 0) {
623fdc
-                flags &= ~0x0ff;        /* ignore any previous IZUNIX field */
623fdc
+            if (have_new_type_eb == 0) {        /* (< 1) */
623fdc
                 have_new_type_eb = 1;
623fdc
             }
623fdc
+            if (have_new_type_eb <= 1) {
623fdc
+                /* Ignore any prior (EF_IZUNIX/EF_PKUNIX) UID/GID. */
623fdc
+                flags &= 0x0ff;
623fdc
+            }
623fdc
 #ifdef IZ_HAVE_UXUIDGID
623fdc
             if (have_new_type_eb > 1)
623fdc
                 break;          /* IZUNIX3 overrides IZUNIX2 e.f. block ! */
623fdc
@@ -2933,6 +2936,8 @@
623fdc
             /* new 3rd generation Unix ef */
623fdc
             have_new_type_eb = 2;
623fdc
 
623fdc
+            /* Ignore any prior EF_IZUNIX/EF_PKUNIX/EF_IZUNIX2 UID/GID. */
623fdc
+            flags &= 0x0ff;
623fdc
         /*
623fdc
           Version       1 byte      version of this extra field, currently 1
623fdc
           UIDSize       1 byte      Size of UID field
623fdc
@@ -2953,8 +2958,6 @@
623fdc
                 uid_size = *((EB_HEADSIZE + 1) + ef_buf);
623fdc
                 gid_size = *((EB_HEADSIZE + uid_size + 2) + ef_buf);
623fdc
 
623fdc
-                flags &= ~0x0ff;      /* ignore any previous UNIX field */
623fdc
-
623fdc
                 if ( read_ux3_value((EB_HEADSIZE + 2) + ef_buf,
623fdc
                                     uid_size, &z_uidgid[0])
623fdc
                     &&