projects/guix·blob python-team · refs

41 lines · 1.5 KiB

1From: "Steven M. Schweda" <[email protected]>
2Subject: Do not ignore extra fields containing Unix Timestamps
3Bug-Debian: https://bugs.debian.org/842993
4X-Debian-version: 6.0-21
5
6--- a/process.c
7+++ b/process.c
8@@ -2914,10 +2914,13 @@
9 break;
10
11 case EF_IZUNIX2:
12- if (have_new_type_eb == 0) {
13- flags &= ~0x0ff; /* ignore any previous IZUNIX field */
14+ if (have_new_type_eb == 0) { /* (< 1) */
15 have_new_type_eb = 1;
16 }
17+ if (have_new_type_eb <= 1) {
18+ /* Ignore any prior (EF_IZUNIX/EF_PKUNIX) UID/GID. */
19+ flags &= 0x0ff;
20+ }
21 #ifdef IZ_HAVE_UXUIDGID
22 if (have_new_type_eb > 1)
23 break; /* IZUNIX3 overrides IZUNIX2 e.f. block ! */
24@@ -2933,6 +2936,8 @@
25 /* new 3rd generation Unix ef */
26 have_new_type_eb = 2;
27
28+ /* Ignore any prior EF_IZUNIX/EF_PKUNIX/EF_IZUNIX2 UID/GID. */
29+ flags &= 0x0ff;
30 /*
31 Version 1 byte version of this extra field, currently 1
32 UIDSize 1 byte Size of UID field
33@@ -2953,8 +2958,6 @@
34 uid_size = *((EB_HEADSIZE + 1) + ef_buf);
35 gid_size = *((EB_HEADSIZE + uid_size + 2) + ef_buf);
36
37- flags &= ~0x0ff; /* ignore any previous UNIX field */
38-
39 if ( read_ux3_value((EB_HEADSIZE + 2) + ef_buf,
40 uid_size, &z_uidgid[0])
41 &&