* rebased llvm/hotfix-sparcv9-not-64.diff
[t2sde.git] / package / archiver / unzip / unzip-6.0-timestamp.patch
blobdbfac7fd223e8e38e70975eb672b1c9cc593350d
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/unzip/unzip-6.0-timestamp.patch
3 # Copyright (C) 2022 The T2 SDE Project
4 #
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7 #
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License version 2 as used by the T2 SDE.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 From: "Steven M. Schweda" <sms@antinode.info>
15 Subject: Do not ignore extra fields containing Unix Timestamps
16 Bug-Debian: https://bugs.debian.org/842993
17 X-Debian-version: 6.0-21
19 --- a/process.c
20 +++ b/process.c
21 @@ -2914,10 +2914,13 @@
22 break;
24 case EF_IZUNIX2:
25 - if (have_new_type_eb == 0) {
26 - flags &= ~0x0ff; /* ignore any previous IZUNIX field */
27 + if (have_new_type_eb == 0) { /* (< 1) */
28 have_new_type_eb = 1;
30 + if (have_new_type_eb <= 1) {
31 + /* Ignore any prior (EF_IZUNIX/EF_PKUNIX) UID/GID. */
32 + flags &= 0x0ff;
33 + }
34 #ifdef IZ_HAVE_UXUIDGID
35 if (have_new_type_eb > 1)
36 break; /* IZUNIX3 overrides IZUNIX2 e.f. block ! */
37 @@ -2933,6 +2936,8 @@
38 /* new 3rd generation Unix ef */
39 have_new_type_eb = 2;
41 + /* Ignore any prior EF_IZUNIX/EF_PKUNIX/EF_IZUNIX2 UID/GID. */
42 + flags &= 0x0ff;
44 Version 1 byte version of this extra field, currently 1
45 UIDSize 1 byte Size of UID field
46 @@ -2953,8 +2958,6 @@
47 uid_size = *((EB_HEADSIZE + 1) + ef_buf);
48 gid_size = *((EB_HEADSIZE + uid_size + 2) + ef_buf);
50 - flags &= ~0x0ff; /* ignore any previous UNIX field */
52 if ( read_ux3_value((EB_HEADSIZE + 2) + ef_buf,
53 uid_size, &z_uidgid[0])