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