Package: unzip
Version: 6.0-7
Severity: important
Tags: upstream

When unzipping a file with -X unzip doesn't restore uid/gid information
although it is present in the zip file. I asked about this on the infozip
forum and they confirmed it was a bug in the build system. They also 
supplied patches to make it work which I'll include.

You can see the discussion on 
http://www.info-zip.org/phpBB3/viewtopic.php?f=3&t=402

This is the debian/rules patch:
--- unzip-6.0/debian/rules      2012-03-31 23:57:19.000000000 +0200
+++ unzip-6.0.patched/debian/rules      2012-09-30 14:02:51.000000000 +0200
@@ -28,6 +28,7 @@
 
 build:
        $(MAKE) -f unix/Makefile D_USE_BZ2=-DUSE_BZIP2 L_BZ2=-lbz2 \
+        LOCAL_UNZIP=-DIZ_HAVE_UXUIDGID \
                CC="$(CC)" LF2="$(LDFLAGS)" \
                CF="$(CFLAGS) $(CPPFLAGS) -I. $(DEFINES)" unzips
        touch build

and the process.c file patch:
--- unzip610b/process.c 2010-10-31 21:00:00.000000000 +0100
+++ process.c   2012-09-30 12:35:27.000000000 +0200
@@ -2993,9 +2993,9 @@
         */
 
 #ifdef IZ_HAVE_UXUIDGID
-            if (eb_len >= EB_UX3_MINLEN
-                && z_uidgid != NULL
-                && (*((EB_HEADSIZE + 0) + ef_buf) == 1)
+            if ((eb_len >= EB_UX3_MINLEN)
+                && (z_uidgid != NULL)
+                && ((*((EB_HEADSIZE + 0) + ef_buf) == 1)))
                     /* only know about version 1 */
             {
                 uch uid_size;
@@ -3007,10 +3007,10 @@
                 flags &= ~0x0ff;      /* ignore any previous UNIX field */
 
                 if ( read_ux3_value((EB_HEADSIZE + 2) + ef_buf,
-                                    uid_size, z_uidgid[0])
+                                    uid_size, &z_uidgid[0])
                     &&
                      read_ux3_value((EB_HEADSIZE + uid_size + 3) + ef_buf,
-                                    gid_size, z_uidgid[1]) )
+                                    gid_size, &z_uidgid[1]) )
                 {
                     flags |= EB_UX2_VALID;   /* signal success */
                 }

Kind regards,
Axel

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages unzip depends on:
ii  libbz2-1.0  1.0.6-4
ii  libc6       2.13-35

unzip recommends no packages.

Versions of packages unzip suggests:
ii  zip  3.0-6

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to