Package: file
Version: 4.15-2
Severity: important
Tags: patch
I noticed that file didn't recognise an ext2 filesystem image. I checked the
hexdump against the magic patterns and concluded that it should match. Copying
the magic to ~/.magic fixed the problem.
Figuring something was wrong with parsing the /usr/share/file/magic file, I
started a binary search, cutting out large parts of the file until I narrowed
it down to the 3rd cracklib signature (big endian 64-bit), removing it makes
file correctly detect ext2 image files.
It happens to match on having the first 4 all zero bytes, but generates no
output and then failing on the second/third tests.
Attached is a patch that works here, which matches on the second 4 bytes of
the signature before checking if the first 4 are all zeros, but I'm not sure
if it is a correct fix (i.e. it would probably output the cracklib
identification even when the first 4 bytes are non-zero).
Jan
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-rc1-mm3
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Versions of packages file depends on:
ii libc6 2.3.5-7 GNU C Library: Shared libraries an
ii libmagic1 4.15-2 File type determination library us
ii zlib1g 1:1.2.3-6 compression library - runtime
file recommends no packages.
-- no debconf information
--- /usr/share/file/magic 2005-10-14 10:07:58.000000000 -0400
+++ /tmp/m 2005-12-15 13:34:51.000000000 -0500
@@ -2623,8 +2623,8 @@
>>8 long >-1 (%i words)
0 belong 0x70775631 Cracklib password index, big endian
>4 belong >-1 (%i words)
-0 long 0
->4 belong 0x70775631 Cracklib password index, big endian ("64-bit")
+4 belong 0x70775631 Cracklib password index, big endian ("64-bit")
+>0 long 0
>12 belong >0 (%i words)
#------------------------------------------------------------------------------