- fix #668304 - support for com32r programs

- distinguish between GFS2 and GFS1 filesystems
This commit is contained in:
Jan Kaluza 2011-01-10 10:27:25 +01:00
parent 7a5a11f5a7
commit 2c3491df82
3 changed files with 44 additions and 1 deletions

14
file-5.04-com32r.patch Normal file
View File

@ -0,0 +1,14 @@
diff -up file-5.04/magic/Magdir/msdos.com32r file-5.04/magic/Magdir/msdos
--- file-5.04/magic/Magdir/msdos.com32r 2011-01-09 22:31:07.000000000 +0100
+++ file-5.04/magic/Magdir/msdos 2011-01-09 23:26:32.000000000 +0100
@@ -349,6 +349,10 @@
# start with assembler instructions mov eax,21cd4cffh
0 uleshort&0xc0ff 0xc0b8
>1 lelong 0x21cd4cff COM executable (32-bit COMBOOT)
+# syslinux:doc/comboot.txt
+# A COM32R program must start with the byte sequence B8 FE 4C CD 21 (mov
+# eax,21cd4cfeh) as a magic number.
+0 string \xb8\xfe\x4c\xcd\x21 COM executable (COM32R)
0 string \x81\xfc
>4 string \x77\x02\xcd\x20\xb9
>>36 string UPX! FREE-DOS executable (COM), UPX compressed

21
file-5.04-gfs.patch Normal file
View File

@ -0,0 +1,21 @@
diff --git a/magic/Magdir/filesystems b/magic/Magdir/filesystems
index 8d60f69..50dae60 100644
--- a/magic/Magdir/filesystems
+++ b/magic/Magdir/filesystems
@@ -1468,9 +1468,13 @@
# From Eric Sandeen
# GFS2
-0x10000 belong 0x01161970 GFS2 Filesystem
->0x10024 belong x (blocksize %d,
->0x10060 string >\0 lockproto %s)
+0x10000 belong 0x01161970
+>0x10018 belong 0x0000051d GFS1 Filesystem
+>>0x10024 belong x (blocksize %d,
+>>0x10060 string >\0 lockproto %s)
+>0x10018 belong 0x00000709 GFS2 Filesystem
+>>0x10024 belong x (blocksize %d,
+>>0x10060 string >\0 lockproto %s)
# BTRFS
0x10040 string _BHRfS_M BTRFS Filesystem

View File

@ -5,7 +5,7 @@
Summary: A utility for determining file types
Name: file
Version: 5.04
Release: 17%{?dist}
Release: 18%{?dist}
License: BSD
Group: Applications/File
Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
@ -27,6 +27,8 @@ Patch13: file-5.04-python-2.7.patch
Patch14: file-5.04-webm.patch
Patch15: file-5.04-zip64.patch
Patch16: file-5.04-string-size.patch
Patch17: file-5.04-com32r.patch
Patch18: file-5.04-gfs.patch
Requires: file-libs = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -111,6 +113,8 @@ file(1) command.
%patch15 -p1
#fixes #656395
%patch16 -p1
%patch17 -p1
%patch18 -p1
iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_
touch -r doc/libmagic.man doc/libmagic.man_
@ -188,6 +192,10 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
* Mon Jan 10 2011 Jan Kaluza <jkaluza@redhat.com> - 5.04-18
- fix #668304 - support for com32r programs
- distinguish between GFS2 and GFS1 filesystems
* Wed Nov 24 2010 Jan Kaluza <jkaluza@redhat.com> - 5.04-17
- fix #656395 - "string" magic directive supports longer strings