Your message dated Thu, 21 Dec 2006 02:32:02 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#366660: fixed in gzip 1.3.9-1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: gzip
Version: 1.3.5-13
Severity: critical
Tags: patch
Justification: causes serious data loss

gzip must check that closing the output file succeeds before removing
the input file, since on an NFS filesystem write failures may only be
reported at close time (see the close(2) man page).

Indeed in our environment we are seeing this problem with NFS and disk
quotas.  This results in loss of the input file, despite the fact that
gzip reports an error and the output file is truncated.

I've attached a proposed patch.  In the original code, copy_stat() has
the side-effect of removing the input file.  Here I have moved the
unlink out of that function and to below the close of the output file.

Matt


-- System Information:
Debian Release: testing/unstable
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16.4-general
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)

Versions of packages gzip depends on:
hi  debianutils                   2.15.2     Miscellaneous utilities specific t
hi  libc6                         2.3.5-8    GNU C Library: Shared libraries an

gzip recommends no packages.

-- no debconf information
--- gzip.c.orig	2006-05-10 15:12:34.000000000 +1000
+++ gzip.c	2006-05-10 15:45:35.000000000 +1000
@@ -882,10 +882,21 @@
 
     close(ifd);
     if (!to_stdout) {
-         /* Copy modes, times, ownership, and remove the input file */
-         copy_stat(&istat);
-         if (close(ofd))
-            write_error();
+	 /* Copy modes, times, and ownership */
+	 copy_stat(&istat);
+	 if (close(ofd))
+	   write_error();
+	 remove_ofname = 0;
+
+	 /* It's now safe to remove the input file: */
+	 if (xunlink (ifname)) {
+	   int e = errno;
+	   WARN((stderr, "%s: ", progname));
+	   if (!quiet) {
+	     errno = e;
+	     perror(ifname);
+	   }
+	}
     }
     if (method == -1) {
 	if (!to_stdout) xunlink (ofname);
@@ -1745,16 +1756,6 @@
 #ifndef NO_CHOWN
     fchown(ofd, ifstat->st_uid, ifstat->st_gid);  /* Copy ownership */
 #endif
-    remove_ofname = 0;
-    /* It's now safe to remove the input file: */
-    if (xunlink (ifname)) {
-	int e = errno;
-	WARN((stderr, "%s: ", progname));
-	if (!quiet) {
-	    errno = e;
-	    perror(ifname);
-	}
-    }
 }
 
 #if ! NO_DIR

--- End Message ---
--- Begin Message ---
Source: gzip
Source-Version: 1.3.9-1

We believe that the bug you reported is fixed in the latest version of
gzip, which is due to be installed in the Debian FTP archive:

gzip_1.3.9-1.diff.gz
  to pool/main/g/gzip/gzip_1.3.9-1.diff.gz
gzip_1.3.9-1.dsc
  to pool/main/g/gzip/gzip_1.3.9-1.dsc
gzip_1.3.9-1_i386.deb
  to pool/main/g/gzip/gzip_1.3.9-1_i386.deb
gzip_1.3.9.orig.tar.gz
  to pool/main/g/gzip/gzip_1.3.9.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Bdale Garbee <[EMAIL PROTECTED]> (supplier of updated gzip package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Wed, 20 Dec 2006 19:16:36 -0700
Source: gzip
Binary: gzip
Architecture: source i386
Version: 1.3.9-1
Distribution: unstable
Urgency: low
Maintainer: Bdale Garbee <[EMAIL PROTECTED]>
Changed-By: Bdale Garbee <[EMAIL PROTECTED]>
Description: 
 gzip       - The GNU compression utility
Closes: 366660 395450 403308 403970
Changes: 
 gzip (1.3.9-1) unstable; urgency=low
 .
   * new upstream version, closes: #366660, #403308
   * clean up a few gratuitous differences from new upstream, leaving
     only the rsyncable patch and tweaks like zmore always using more
   * fix spelling error in documentation, closes: #395450
   * upstream patch for regression uncompressing null input, closes: #403970
Files: 
 4697a1050e8fc124bd231c4e83acd033 550 utils required gzip_1.3.9-1.dsc
 7cf923b24b718c418e85a283b2260e14 420737 utils required gzip_1.3.9.orig.tar.gz
 92d34edb5de9ec29e77a9da643d035f3 11385 utils required gzip_1.3.9-1.diff.gz
 18436d784b9014c02708246fae1a163e 75716 utils required gzip_1.3.9-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFie8NZKfAp/LPAagRAlBLAJ9YzYvXLq3UQIWw0p5soDHUH07BfQCghmFJ
XKCd9SSUex7PhoFwc7d2S5c=
=E99x
-----END PGP SIGNATURE-----


--- End Message ---

Reply via email to