Dash:
[t2.git] / package / archiver / unzip / 20-unzip-uidgid-fix.patch
blobd0a79d23b6e7049fb0bb43e03ba60fdfb4839ad7
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/unzip/20-unzip-uidgid-fix.patch
3 # Copyright (C) 2021 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: sms
15 Subject: Restore uid and gid information when requested
16 Bug-Debian: http://bugs.debian.org/689212
17 X-Debian-version: 6.0-8
19 --- a/process.c
20 +++ b/process.c
21 @@ -2904,7 +2904,7 @@
22 #ifdef IZ_HAVE_UXUIDGID
23 if (eb_len >= EB_UX3_MINLEN
24 && z_uidgid != NULL
25 - && (*((EB_HEADSIZE + 0) + ef_buf) == 1)
26 + && (*((EB_HEADSIZE + 0) + ef_buf) == 1))
27 /* only know about version 1 */
29 uch uid_size;
30 @@ -2916,10 +2916,10 @@
31 flags &= ~0x0ff; /* ignore any previous UNIX field */
33 if ( read_ux3_value((EB_HEADSIZE + 2) + ef_buf,
34 - uid_size, z_uidgid[0])
35 + uid_size, &z_uidgid[0])
37 read_ux3_value((EB_HEADSIZE + uid_size + 3) + ef_buf,
38 - gid_size, z_uidgid[1]) )
39 + gid_size, &z_uidgid[1]) )
41 flags |= EB_UX2_VALID; /* signal success */