Your message dated Tue, 20 Jun 2006 14:18:17 -0700
with message-id <[EMAIL PROTECTED]>
and subject line Bug#366660: fixed in gzip 1.3.5-14
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.5-14

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.5-14.diff.gz
  to pool/main/g/gzip/gzip_1.3.5-14.diff.gz
gzip_1.3.5-14.dsc
  to pool/main/g/gzip/gzip_1.3.5-14.dsc
gzip_1.3.5-14_i386.deb
  to pool/main/g/gzip/gzip_1.3.5-14_i386.deb



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: Tue, 20 Jun 2006 15:02:27 -0600
Source: gzip
Binary: gzip
Architecture: source i386
Version: 1.3.5-14
Distribution: unstable
Urgency: medium
Maintainer: Bdale Garbee <[EMAIL PROTECTED]>
Changed-By: Bdale Garbee <[EMAIL PROTECTED]>
Description: 
 gzip       - The GNU compression utility
Closes: 190442 192891 292896 334540 366660
Changes: 
 gzip (1.3.5-14) unstable; urgency=medium
 .
   * update section to match override
   * patch from Matthew Chapman to avoid deleting input file before we're
     sure the output file has been written without errors, closes: #366660
   * patch from Reuben Thomas to fix zgrep return code,
     closes: #292896, #192891, #190442
   * enable gzexe compressed files to work on systems where tempfile is not
     available while retaining preference for tempfile, closes: #334540
Files: 
 e59d87f1f1052a104cf873c997300154 552 utils required gzip_1.3.5-14.dsc
 e73d2723c9d19c593fb5b049415f5ddf 58134 utils required gzip_1.3.5-14.diff.gz
 7bbf10aa5db9b30709f3469f2ccb426e 73182 utils required gzip_1.3.5-14_i386.deb

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

iD8DBQFEmGMmZKfAp/LPAagRAjudAKCG0vH/Fz4pVvot3SZDBgjISa3w9gCeMjMK
TJ8JpUukpBqjj21g3OGvUac=
=XVQI
-----END PGP SIGNATURE-----


--- End Message ---

Reply via email to