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