Your message dated Tue, 08 Apr 2008 13:02:43 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#393878: fixed in mtools 3.9.11-1
has caused the Debian Bug report #393878,
regarding mzip unreliable on 2.6.18 (patch)
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 this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
393878: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=393878
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: mtools
Version: 3.9.10.ds1-3

The mzip command, used to set passwords on ZIP and JAZ mediums do not
seem to work reliably anymore with the 2.6.18 kernel. Symptoms are
that, sometimes, mzip reports "bad password" even though the password
is, in fact, correct. (Yes, the password is indeed correct, I used the
one letter password 'x' for testing, and that's really hard to forget,
and the problem is reproducable ;-) The problem is likely in the
emulation of the obsolete SCSI ioctl in the kernel used by mzip (to be
handled in a separate bug report) but nevertheless, the following
patch makes use of the more modern SG_IO iotcl for the same job, and
in my tests, fixes mzip.

The following patch to "scsi.c" addresses this issue, and also avoids
a kernel warning on the obsolete interface.

Greetings,
        Thomas

/*---- snip ----*/

--- /tmp/mtools-3.9.10/scsi.c   2002-11-02 13:09:28.000000000 +0100
+++ scsi.c      2006-10-17 21:11:01.000000000 +0200
@@ -37,12 +37,7 @@
 #endif
 
 #ifdef OS_linux
-#define SCSI_IOCTL_SEND_COMMAND 1
-struct scsi_ioctl_command {
-    int  inlen;
-    int  outlen;
-    char cmd[5008];
-};
+#include <scsi/sg.h>
 #endif
 
 #ifdef _SCO_DS
@@ -148,37 +143,33 @@
        return 0;
        
 #elif defined OS_linux
-       struct scsi_ioctl_command scsi_cmd;
+       struct sg_io_hdr scsi_cmd;
 
+       /*
+       ** Init the command
+       */
+       memset(&scsi_cmd,0,sizeof(scsi_cmd));
+       scsi_cmd.interface_id    = 'S';
+       scsi_cmd.dxfer_direction = (mode == 
SCSI_IO_READ)?(SG_DXFER_FROM_DEV):(SG_DXFER_TO_DEV);
+       scsi_cmd.cmd_len         = cmdlen;
+       scsi_cmd.mx_sb_len       = 0;
+       scsi_cmd.dxfer_len       = len;
+       scsi_cmd.dxferp          = data;
+       scsi_cmd.cmdp            = cdb;
+       scsi_cmd.timeout         = ~0; /* where is MAX_UINT defined??? */
+       
+#if DEBUG
+       printf("CMD(%d): %02x%02x%02x%02x%02x%02x 
%sdevice\n",cmdlen,cdb[0],cdb[1],cdb[2],cdb[3],cdb[4],cdb[5],
+              (mode==SCSI_IO_READ)?("<-"):("->"));
+       printf("DATA   : len = %d\n",len);
+#endif
 
-       memcpy(scsi_cmd.cmd, cdb, cmdlen);        /* copy command */
-
-       switch (mode) {
-               case SCSI_IO_READ:
-                       scsi_cmd.inlen = 0;
-                       scsi_cmd.outlen = len;
-                       break;
-               case SCSI_IO_WRITE:
-                       scsi_cmd.inlen = len;
-                       scsi_cmd.outlen = 0;
-                       memcpy(scsi_cmd.cmd + cmdlen,data,len);
-                       break;
-       }
-       
-       if (ioctl(fd, SCSI_IOCTL_SEND_COMMAND, &scsi_cmd) < 0) {
+       if (ioctl(fd, SG_IO,&scsi_cmd) < 0) {
                perror("scsi_io");
                return -1;
        }
-       
-       switch (mode) {
-               case SCSI_IO_READ:
-                       memcpy(data, &scsi_cmd.cmd[0], len);
-                       break;
-               case SCSI_IO_WRITE:
-                       break;
-    }
 
-       return 0;  /* where to get scsi status? */
+       return 0;
 
 #elif (defined _SCO_DS) && (defined SCSIUSERCMD)
        struct scsicmd scsi_cmd;

/*---- snip ----*/


--- End Message ---
--- Begin Message ---
Source: mtools
Source-Version: 3.9.11-1

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

floppyd_3.9.11-1_i386.deb
  to pool/main/m/mtools/floppyd_3.9.11-1_i386.deb
mtools_3.9.11-1.diff.gz
  to pool/main/m/mtools/mtools_3.9.11-1.diff.gz
mtools_3.9.11-1.dsc
  to pool/main/m/mtools/mtools_3.9.11-1.dsc
mtools_3.9.11-1_i386.deb
  to pool/main/m/mtools/mtools_3.9.11-1_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.
Anibal Monsalve Salazar <[EMAIL PROTECTED]> (supplier of updated mtools 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, 08 Apr 2008 07:54:04 +1000
Source: mtools
Binary: floppyd mtools
Architecture: source i386
Version: 3.9.11-1
Distribution: unstable
Urgency: low
Maintainer: Anibal Monsalve Salazar <[EMAIL PROTECTED]>
Changed-By: Anibal Monsalve Salazar <[EMAIL PROTECTED]>
Description: 
 floppyd    - Daemon for remote access to floppy drives
 mtools     - Tools for manipulating MSDOS files
Closes: 393878 421561 450596 468744 474817
Changes: 
 mtools (3.9.11-1) unstable; urgency=low
 .
   * Merged Ubuntu's changes
   * Don't build with -m486. Closes: #474817
   * Don't build-depend on xlibs-static-dev. Build-depends on
     libxfont-dev. Closes: #421561
   * floppyd does not depend on mtools. Closes: #450596
   * Fixed "mzip unreliable on 2.6.18". Closes: #393878
     Patch by Thomas Richter <[EMAIL PROTECTED]>
   * mtools.1: fixed typos. Closes: #468744
     Patch by A. Costa <[EMAIL PROTECTED]>
   * debian/watch: added
   * Fixed the following lintian issues:
     W: mtools source: debian-rules-ignores-make-clean-error line 28
     W: mtools source: out-of-date-standards-version 3.7.2 (current is 3.7.3)
     W: mtools source: debian-rules-ignores-make-clean-error line 28
     W: mtools source: out-of-date-standards-version 3.7.2 (current is 3.7.3)
     W: mtools: description-contains-homepage
     W: floppyd: description-contains-homepage
     E: mtools: copyright-file-contains-full-gfdl-license
     E: floppyd: copyright-file-contains-full-gfdl-license
Files: 
 343cb605d6c3e072cbbf0ad17490f4ba 747 otherosfs standard mtools_3.9.11-1.dsc
 b7507b532db7a3b111396cf60c23c2dc 15426 otherosfs standard 
mtools_3.9.11-1.diff.gz
 662de0047f9cd25db92d00cd44c50e78 36428 otherosfs extra 
floppyd_3.9.11-1_i386.deb
 a83066a4a2a22803e3cbd0d68ed8ef43 195660 otherosfs standard 
mtools_3.9.11-1_i386.deb

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

iD8DBQFH+2segY5NIXPNpFURAn50AJ0cwuNqYWzHMQpVgAHtGiZ/w+afJgCfc0QZ
PZbEvx2b0uEL2avDKlmm6Tc=
=V2Rh
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to