import file-5.33-15.el8
This commit is contained in:
commit
7ed017ff70
1
.file.metadata
Normal file
1
.file.metadata
Normal file
@ -0,0 +1 @@
|
||||
31a67e4dc0a3d7a8d1b850429c3f625314700240 SOURCES/file-5.33.tar.gz
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
SOURCES/file-5.33.tar.gz
|
||||
12
SOURCES/file-4.17-rpm-name.patch
Normal file
12
SOURCES/file-4.17-rpm-name.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/magic/Magdir/rpm b/magic/Magdir/rpm
|
||||
index 9a795f8..31db083 100644
|
||||
--- a/magic/Magdir/rpm
|
||||
+++ b/magic/Magdir/rpm
|
||||
@@ -29,6 +29,7 @@
|
||||
>>8 beshort 17 SuperH
|
||||
>>8 beshort 18 Xtensa
|
||||
>>8 beshort 255 noarch
|
||||
+>>10 string x %s
|
||||
|
||||
#delta RPM Daniel Novotny (dnovotny@redhat.com)
|
||||
0 string drpm Delta RPM
|
||||
10
SOURCES/file-5.04-volume_key.patch
Normal file
10
SOURCES/file-5.04-volume_key.patch
Normal file
@ -0,0 +1,10 @@
|
||||
diff --git a/magic/Magdir/securitycerts b/magic/Magdir/securitycerts
|
||||
index 8785dd8..1c340be 100644
|
||||
--- a/magic/Magdir/securitycerts
|
||||
+++ b/magic/Magdir/securitycerts
|
||||
@@ -4,3 +4,5 @@
|
||||
0 search/1 -----BEGIN\ CERTIFICATE------ RFC1421 Security Certificate text
|
||||
0 search/1 -----BEGIN\ NEW\ CERTIFICATE RFC1421 Security Certificate Signing Request text
|
||||
0 belong 0xedfeedfe Sun 'jks' Java Keystore File data
|
||||
+
|
||||
+0 string \0volume_key volume_key escrow packet
|
||||
28
SOURCES/file-5.33-CVE-2018-10360.patch
Normal file
28
SOURCES/file-5.33-CVE-2018-10360.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 8616080aecf07436e80a27f68c336382c1d1c22d Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Sat, 9 Jun 2018 16:00:06 +0000
|
||||
Subject: [PATCH] Avoid reading past the end of buffer (Rui Reis)
|
||||
|
||||
Upstream-commit: a642587a9c9e2dd7feacdf513c3643ce26ad3c22
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
src/readelf.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/readelf.c b/src/readelf.c
|
||||
index 3df0836..d96a538 100644
|
||||
--- a/src/readelf.c
|
||||
+++ b/src/readelf.c
|
||||
@@ -825,7 +825,8 @@ do_core_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
|
||||
|
||||
cname = (unsigned char *)
|
||||
&nbuf[doff + prpsoffsets(i)];
|
||||
- for (cp = cname; *cp && isprint(*cp); cp++)
|
||||
+ for (cp = cname; cp < nbuf + size && *cp
|
||||
+ && isprint(*cp); cp++)
|
||||
continue;
|
||||
/*
|
||||
* Linux apparently appends a space at the end
|
||||
--
|
||||
2.14.4
|
||||
|
||||
37
SOURCES/file-5.33-clamav.patch
Normal file
37
SOURCES/file-5.33-clamav.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From fb1604080767501fde17eb601382e84f1c1ddca3 Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Mon, 16 Jul 2018 12:30:41 +0000
|
||||
Subject: [PATCH] remember to put a space between the version and the number,
|
||||
plus more version parsing (Kamil Dudka)
|
||||
|
||||
Upstream-commit: 1a7f58c9f253e3b902bfb7a77afd8375b0b428b7
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
magic/Magdir/fsav | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/magic/Magdir/fsav b/magic/Magdir/fsav
|
||||
index 5714798..5d72ab9 100644
|
||||
--- a/magic/Magdir/fsav
|
||||
+++ b/magic/Magdir/fsav
|
||||
@@ -48,13 +48,15 @@
|
||||
>11 string >\0 Clam AntiVirus database %-.23s
|
||||
>>34 string :
|
||||
>>>35 string !: \b, version
|
||||
->>>>35 string x \b%-.1s
|
||||
->>>>>36 string !:
|
||||
+>>>>35 string x \b %-.1s
|
||||
+>>>>>36 string !:
|
||||
>>>>>>36 string x \b%-.1s
|
||||
>>>>>>>37 string !:
|
||||
>>>>>>>>37 string x \b%-.1s
|
||||
>>>>>>>>>38 string !:
|
||||
>>>>>>>>>>38 string x \b%-.1s
|
||||
+>>>>>>>>>>>39 string !:
|
||||
+>>>>>>>>>>>>39 string x \b%-.1s
|
||||
>512 string \037\213 \b, gzipped
|
||||
>769 string ustar\0 \b, tarred
|
||||
|
||||
--
|
||||
2.14.4
|
||||
|
||||
31
SOURCES/file-5.33-covscan.patch
Normal file
31
SOURCES/file-5.33-covscan.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From 7bd1d499157caa391082f594d197f49f5327bd56 Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Wed, 1 Aug 2018 09:59:45 +0000
|
||||
Subject: [PATCH] fix leak on error, found by coverity.
|
||||
|
||||
Upstream-commit: e0805be4909e47dac47bab9d0caf3725da43e645
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
src/compress.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/compress.c b/src/compress.c
|
||||
index 184011b..cb11303 100644
|
||||
--- a/src/compress.c
|
||||
+++ b/src/compress.c
|
||||
@@ -249,8 +249,11 @@ file_zmagic(struct magic_set *ms, const struct buffer *b, const char *name)
|
||||
* XXX: If file_buffer fails here, we overwrite
|
||||
* the compressed text. FIXME.
|
||||
*/
|
||||
- if (file_buffer(ms, -1, NULL, buf, nbytes) == -1)
|
||||
+ if (file_buffer(ms, -1, NULL, buf, nbytes) == -1) {
|
||||
+ if (file_pop_buffer(ms, pb) != NULL)
|
||||
+ abort();
|
||||
goto error;
|
||||
+ }
|
||||
if ((rbuf = file_pop_buffer(ms, pb)) != NULL) {
|
||||
if (file_printf(ms, "%s", rbuf) == -1) {
|
||||
free(rbuf);
|
||||
--
|
||||
2.17.2
|
||||
|
||||
30
SOURCES/file-5.33-gif.patch
Normal file
30
SOURCES/file-5.33-gif.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From f0e846528e1c839ab44895a1f13d167a4ad8def3 Mon Sep 17 00:00:00 2001
|
||||
From: Marek Cermak <macermak@redhat.com>
|
||||
Date: Wed, 20 Dec 2017 16:18:46 +0100
|
||||
Subject: [PATCH] Resolves: #1515180 - image/gif classifed as
|
||||
application/octet-stream
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1515180
|
||||
|
||||
Signed-off-by: Marek Cermak <macermak@redhat.com>
|
||||
---
|
||||
magic/Magdir/images | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/magic/Magdir/images b/magic/Magdir/images
|
||||
index 69e8e90f..76f7e7da 100644
|
||||
--- a/magic/Magdir/images
|
||||
+++ b/magic/Magdir/images
|
||||
@@ -468,7 +468,9 @@
|
||||
!:mime image/x-unknown
|
||||
|
||||
# GIF
|
||||
+# Strength set up to beat 0x55AA DOS/MBR signature word lookups (+65)
|
||||
0 string GIF8 GIF image data
|
||||
+!:strength +80
|
||||
!:mime image/gif
|
||||
!:apple 8BIMGIFf
|
||||
>4 string 7a \b, version 8%s,
|
||||
--
|
||||
2.13.6
|
||||
|
||||
34
SOURCES/file-5.33-pie-executable-revert.patch
Normal file
34
SOURCES/file-5.33-pie-executable-revert.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From 719116b196fd873f5a463dfdb0fd6258cee51591 Mon Sep 17 00:00:00 2001
|
||||
From: Kamil Dudka <kdudka@redhat.com>
|
||||
Date: Tue, 22 May 2018 18:18:06 +0200
|
||||
Subject: [PATCH] Revert "add a conditional in description"
|
||||
|
||||
Upstream-commit: 6876ebadcdf27224b3ffa9dfa4343127aa97c9b2
|
||||
|
||||
... and partially revert upstream commit
|
||||
7dbecfe406a6bb2de1fe7ec2fe413dcd8871ac74
|
||||
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
magic/Magdir/elf | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/magic/Magdir/elf b/magic/Magdir/elf
|
||||
index 7fd5de1..dba5a73 100644
|
||||
--- a/magic/Magdir/elf
|
||||
+++ b/magic/Magdir/elf
|
||||
@@ -48,9 +48,8 @@
|
||||
!:mime application/x-object
|
||||
>16 leshort 2 executable,
|
||||
!:mime application/x-executable
|
||||
->16 leshort 3 ${x?pie executable:shared object}
|
||||
-
|
||||
-!:mime application/x-${x?pie-executable:sharedlib}
|
||||
+>16 leshort 3 shared object,
|
||||
+!:mime application/x-sharedlib
|
||||
>16 leshort 4 core file
|
||||
!:mime application/x-coredump
|
||||
# Core file detection is not reliable.
|
||||
--
|
||||
2.14.3
|
||||
|
||||
35
SOURCES/file-5.33-ppc-swap.patch
Normal file
35
SOURCES/file-5.33-ppc-swap.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From ed6062995ae60d6772f2dabc39e03cbf28ee7343 Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Mon, 16 Jul 2018 12:32:08 +0000
|
||||
Subject: [PATCH] more info for ppc swapspace (Kamil Dudka)
|
||||
|
||||
Upstream-commit: 65f9c7053548df8945df600c07123c9151531ee6
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
magic/Magdir/linux | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/magic/Magdir/linux b/magic/Magdir/linux
|
||||
index 0630a8a..11e9237 100644
|
||||
--- a/magic/Magdir/linux
|
||||
+++ b/magic/Magdir/linux
|
||||
@@ -94,6 +94,16 @@
|
||||
# From Daniel Novotny <dnovotny@redhat.com>
|
||||
# swap file for PowerPC
|
||||
65526 string SWAPSPACE2 Linux/ppc swap file
|
||||
+>0x400 long x version %d,
|
||||
+>0x404 long x size %d pages,
|
||||
+>1052 string \0 no label,
|
||||
+>1052 string >\0 LABEL=%s,
|
||||
+>0x40c belong x UUID=%08x
|
||||
+>0x410 beshort x \b-%04x
|
||||
+>0x412 beshort x \b-%04x
|
||||
+>0x414 beshort x \b-%04x
|
||||
+>0x416 belong x \b-%08x
|
||||
+>0x41a beshort x \b%04x
|
||||
16374 string SWAPSPACE2 Linux/ia64 swap file
|
||||
#
|
||||
# Linux kernel boot images, from Albert Cahalan <acahalan@cs.uml.edu>
|
||||
--
|
||||
2.14.4
|
||||
|
||||
53
SOURCES/file-5.33-seccomp.patch
Normal file
53
SOURCES/file-5.33-seccomp.patch
Normal file
@ -0,0 +1,53 @@
|
||||
From 4ae8a24b5ccbee904875a10b7b2301369080a88d Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Sun, 6 May 2018 16:36:41 +0000
|
||||
Subject: [PATCH] add more syscalls; newfstatat is used for stat'ing the magic
|
||||
file, getdents64 is used for getting the magic entries during compilation.
|
||||
|
||||
Upstream-commit: aeddbff330fad0edff2ab4b02dbf0863cd593c3c
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
src/seccomp.c | 15 ++++++++-------
|
||||
1 file changed, 8 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/seccomp.c b/src/seccomp.c
|
||||
index 7c8a3144..481a5624 100644
|
||||
--- a/src/seccomp.c
|
||||
+++ b/src/seccomp.c
|
||||
@@ -59,12 +59,7 @@ enable_sandbox_basic(void)
|
||||
if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) == -1)
|
||||
return -1;
|
||||
|
||||
-#if 0
|
||||
- // prevent escape via ptrace
|
||||
- prctl(PR_SET_DUMPABLE, 0);
|
||||
-#endif
|
||||
-
|
||||
- if (prctl (PR_SET_DUMPABLE, 0, 0, 0, 0) == -1)
|
||||
+ if (prctl(PR_SET_DUMPABLE, 0, 0, 0, 0) == -1)
|
||||
return -1;
|
||||
|
||||
// initialize the filter
|
||||
@@ -171,6 +166,9 @@ enable_sandbox_full(void)
|
||||
ALLOW_RULE(fcntl);
|
||||
ALLOW_RULE(fstat);
|
||||
ALLOW_RULE(getdents);
|
||||
+#ifdef __NR_getdents64
|
||||
+ ALLOW_RULE(getdents64);
|
||||
+#endif
|
||||
ALLOW_RULE(ioctl);
|
||||
ALLOW_RULE(lseek);
|
||||
ALLOW_RULE(lstat);
|
||||
@@ -178,6 +176,9 @@ enable_sandbox_full(void)
|
||||
ALLOW_RULE(mprotect);
|
||||
ALLOW_RULE(mremap);
|
||||
ALLOW_RULE(munmap);
|
||||
+#ifdef __NR_newfstatat
|
||||
+ ALLOW_RULE(newfstatat);
|
||||
+#endif
|
||||
ALLOW_RULE(open);
|
||||
ALLOW_RULE(openat);
|
||||
ALLOW_RULE(pread64);
|
||||
--
|
||||
2.17.0
|
||||
|
||||
26
SOURCES/file-5.34-ebpf-magic.patch
Normal file
26
SOURCES/file-5.34-ebpf-magic.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From b675e1cf6c5f047a1ab52b7dcea3c83ea6aac69f Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Fri, 9 Nov 2018 17:51:12 +0000
|
||||
Subject: [PATCH] Add eBPF magic from Matteo Croce
|
||||
|
||||
Upstream-commit: 4cf4e817457ce6ca32452a7c80b27e96be6441dc
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
magic/Magdir/elf | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/magic/Magdir/elf b/magic/Magdir/elf
|
||||
index 133bd1f..7c6011c 100644
|
||||
--- a/magic/Magdir/elf
|
||||
+++ b/magic/Magdir/elf
|
||||
@@ -263,6 +263,7 @@
|
||||
>18 leshort 217 iCelero CoolEngine,
|
||||
>18 leshort 218 Nanoradio Optimized RISC,
|
||||
>18 leshort 243 UCB RISC-V,
|
||||
+>18 leshort 247 eBPF,
|
||||
>18 leshort 0x1057 AVR (unofficial),
|
||||
>18 leshort 0x1059 MSP430 (unofficial),
|
||||
>18 leshort 0x1223 Adapteva Epiphany (unofficial),
|
||||
--
|
||||
2.17.2
|
||||
|
||||
56
SOURCES/file-5.35-man-apple.patch
Normal file
56
SOURCES/file-5.35-man-apple.patch
Normal file
@ -0,0 +1,56 @@
|
||||
From 5bccda402a33b4b6fee13cbc910580a85f1ab73a Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Mon, 18 Feb 2019 18:59:25 +0000
|
||||
Subject: [PATCH 1/2] Mention that the apple filetype/creator is only available for
|
||||
entries that have it (Kamil Dudka)
|
||||
|
||||
Upstream-commit: 642f269ef99930b44daa2236908da7d05a68eb08
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
doc/file.man | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/doc/file.man b/doc/file.man
|
||||
index 0968321..98061ba 100644
|
||||
--- a/doc/file.man
|
||||
+++ b/doc/file.man
|
||||
@@ -171,6 +171,9 @@ Causes the file command to output the file type and creator code as
|
||||
used by older MacOS versions.
|
||||
The code consists of eight letters,
|
||||
the first describing the file type, the latter the creator.
|
||||
+the first describing the file type, the latter the creator.
|
||||
+This option works properly only for file formats that have the
|
||||
+apple-style output defined.
|
||||
.It Fl b , Fl Fl brief
|
||||
Do not prepend filenames to output lines (brief mode).
|
||||
.It Fl C , Fl Fl compile
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
||||
From f7f3e751c0e606592b4d377a479b40f6964705ab Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Sun, 3 Mar 2019 02:32:40 +0000
|
||||
Subject: [PATCH 2/2] remove duplicate line (chefe)
|
||||
|
||||
Upstream-commit: cde5f5962ebfd057fc2e330da3b36470e6ee3724
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
doc/file.man | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/doc/file.man b/doc/file.man
|
||||
index 98061ba..05da3a7 100644
|
||||
--- a/doc/file.man
|
||||
+++ b/doc/file.man
|
||||
@@ -171,7 +171,6 @@ Causes the file command to output the file type and creator code as
|
||||
used by older MacOS versions.
|
||||
The code consists of eight letters,
|
||||
the first describing the file type, the latter the creator.
|
||||
-the first describing the file type, the latter the creator.
|
||||
This option works properly only for file formats that have the
|
||||
apple-style output defined.
|
||||
.It Fl b , Fl Fl brief
|
||||
--
|
||||
2.21.1
|
||||
|
||||
67
SOURCES/file-5.35-netpbm.patch
Normal file
67
SOURCES/file-5.35-netpbm.patch
Normal file
@ -0,0 +1,67 @@
|
||||
From b3842fb61c829b0b62e7b8a058b8a86cd83aa0e7 Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Tue, 22 Jan 2019 16:17:25 +0000
|
||||
Subject: [PATCH] Make netpbm beat DOS/MBR magic again (Kamil Dudka)
|
||||
|
||||
Upstream-commit: d2f82e2601e551badc03c4ac7a463d8e18f53e32
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
magic/Magdir/images | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/magic/Magdir/images b/magic/Magdir/images
|
||||
index fd20261..afe906c 100644
|
||||
--- a/magic/Magdir/images
|
||||
+++ b/magic/Magdir/images
|
||||
@@ -175,42 +175,42 @@
|
||||
>0 regex/4 P1[\040\t\f\r\n]
|
||||
>>0 use netpbm
|
||||
>>>0 string x \b, bitmap
|
||||
-!:strength + 45
|
||||
+!:strength + 65
|
||||
!:mime image/x-portable-bitmap
|
||||
|
||||
0 search/1 P2
|
||||
>0 regex/4 P2[\040\t\f\r\n]
|
||||
>>0 use netpbm
|
||||
>>>0 string x \b, greymap
|
||||
-!:strength + 45
|
||||
+!:strength + 65
|
||||
!:mime image/x-portable-greymap
|
||||
|
||||
0 search/1 P3
|
||||
>0 regex/4 P3[\040\t\f\r\n]
|
||||
>>0 use netpbm
|
||||
>>>0 string x \b, pixmap
|
||||
-!:strength + 45
|
||||
+!:strength + 65
|
||||
!:mime image/x-portable-pixmap
|
||||
|
||||
0 string P4
|
||||
>0 regex/4 P4[\040\t\f\r\n]
|
||||
>>0 use netpbm
|
||||
>>>0 string x \b, rawbits, bitmap
|
||||
-!:strength + 45
|
||||
+!:strength + 65
|
||||
!:mime image/x-portable-bitmap
|
||||
|
||||
0 string P5
|
||||
>0 regex/4 P5[\040\t\f\r\n]
|
||||
>>0 use netpbm
|
||||
>>>0 string x \b, rawbits, greymap
|
||||
-!:strength + 45
|
||||
+!:strength + 65
|
||||
!:mime image/x-portable-greymap
|
||||
|
||||
0 string P6
|
||||
>0 regex/4 P6[\040\t\f\r\n]
|
||||
>>0 use netpbm
|
||||
>>>0 string x \b, rawbits, pixmap
|
||||
-!:strength + 45
|
||||
+!:strength + 65
|
||||
!:mime image/x-portable-pixmap
|
||||
|
||||
0 string P7 Netpbm PAM image file
|
||||
--
|
||||
2.20.1
|
||||
|
||||
62
SOURCES/file-5.35-ppc-core.patch
Normal file
62
SOURCES/file-5.35-ppc-core.patch
Normal file
@ -0,0 +1,62 @@
|
||||
From 7a4b49897c3bc63bdf680f8cb1d7a04ac932a4ff Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Mon, 21 May 2018 16:32:34 +0000
|
||||
Subject: [PATCH 1/2] Add missing commas.
|
||||
|
||||
Upstream-commit: defcf7e39943780dd19ca002c478e52ec9ee5cbc
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
magic/Magdir/elf | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/magic/Magdir/elf b/magic/Magdir/elf
|
||||
index 7c6ac8f..d5b2d02 100644
|
||||
--- a/magic/Magdir/elf
|
||||
+++ b/magic/Magdir/elf
|
||||
@@ -50,7 +50,7 @@
|
||||
!:mime application/x-executable
|
||||
>16 leshort 3 shared object,
|
||||
!:mime application/x-sharedlib
|
||||
->16 leshort 4 core file
|
||||
+>16 leshort 4 core file,
|
||||
!:mime application/x-coredump
|
||||
# Core file detection is not reliable.
|
||||
#>>>(0x38+0xcc) string >\0 of '%s'
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
||||
From 1c7aa7b88ef9f53e19a64961867427b0c1f04857 Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Tue, 22 Jan 2019 16:28:42 +0000
|
||||
Subject: [PATCH 2/2] Add Linux PowerPC core offsets for Linux (which are off-by-4
|
||||
of the regular offsets), after the regular Linux offsets so that there is no
|
||||
confusion. The linux offsets are tried first since they are before, so on PPC
|
||||
they should contain binary data and not match. Addition requested by: Ondrej
|
||||
Dubaj/Kamil Dudka
|
||||
|
||||
Upstream-commit: 6367a7c9b476767a692f76e78e3b355dc9386e48
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
src/readelf.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/readelf.c b/src/readelf.c
|
||||
index d96a538..c101483 100644
|
||||
--- a/src/readelf.c
|
||||
+++ b/src/readelf.c
|
||||
@@ -246,7 +246,10 @@ static const size_t prpsoffsets32[] = {
|
||||
84, /* SunOS 5.x (short name) */
|
||||
|
||||
44, /* Linux (command line) */
|
||||
- 28, /* Linux 2.0.36 (short name) */
|
||||
+ 28, /* Linux (short name) */
|
||||
+
|
||||
+ 48, /* Linux PowerPC (command line) */
|
||||
+ 32, /* Linux PowerPC (short name) */
|
||||
|
||||
8, /* FreeBSD */
|
||||
};
|
||||
--
|
||||
2.20.1
|
||||
|
||||
40
SOURCES/file-5.37-jffs-magic.patch
Normal file
40
SOURCES/file-5.37-jffs-magic.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From 432267e707aca36bec55704fd404fa572e2c4b45 Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Fri, 15 Nov 2019 23:49:38 +0000
|
||||
Subject: [PATCH] fix JFFS2 (the old magic was just hex encoded 0x1984 which is
|
||||
wrong (Kamil Dudka)
|
||||
|
||||
Upstream-commit: 5ad78c726bb03e0fbdb6d237ef2b13e51968ffea
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
magic/Magdir/filesystems | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/magic/Magdir/filesystems b/magic/Magdir/filesystems
|
||||
index 1920e56..da5c580 100644
|
||||
--- a/magic/Magdir/filesystems
|
||||
+++ b/magic/Magdir/filesystems
|
||||
@@ -2057,10 +2057,6 @@
|
||||
>0x10040 lelong 2 yura hash
|
||||
>0x10040 lelong 3 r5 hash
|
||||
|
||||
-# JFFS - russell@coker.com.au
|
||||
-0 lelong 0x34383931 Linux Journalled Flash File system, little endian
|
||||
-0 belong 0x34383931 Linux Journalled Flash File system, big endian
|
||||
-
|
||||
# EST flat binary format (which isn't, but anyway)
|
||||
# From: Mark Brown <broonie@sirena.org.uk>
|
||||
0 string ESTFBINR EST flat binary
|
||||
@@ -2144,7 +2140,9 @@
|
||||
|
||||
# JFFS2 file system
|
||||
0 leshort 0x1984 Linux old jffs2 filesystem data little endian
|
||||
+0 beshort 0x1984 Linux old jffs2 filesystem data big endian
|
||||
0 leshort 0x1985 Linux jffs2 filesystem data little endian
|
||||
+0 beshort 0x1985 Linux jffs2 filesystem data big endian
|
||||
|
||||
# Squashfs
|
||||
0 string sqsh Squashfs filesystem, big endian,
|
||||
--
|
||||
2.20.1
|
||||
|
||||
64
SOURCES/file-localmagic.patch
Normal file
64
SOURCES/file-localmagic.patch
Normal file
@ -0,0 +1,64 @@
|
||||
From f25107f625e88726e8ae9d4963573b5a0dda8f4c Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kaluza <hanzz.k@gmail.com>
|
||||
Date: Thu, 15 Dec 2011 16:15:41 +0100
|
||||
Subject: [PATCH] file-localmagic.patch
|
||||
|
||||
Upstream says it's up to distributions to add a way to support local-magic.
|
||||
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
magic/magic.local | 3 +++
|
||||
src/Makefile.am | 2 +-
|
||||
src/Makefile.in | 2 +-
|
||||
src/apprentice.c | 2 +-
|
||||
4 files changed, 6 insertions(+), 3 deletions(-)
|
||||
create mode 100644 magic/magic.local
|
||||
|
||||
diff --git a/magic/magic.local b/magic/magic.local
|
||||
new file mode 100644
|
||||
index 0000000..283a863
|
||||
--- /dev/null
|
||||
+++ b/magic/magic.local
|
||||
@@ -0,0 +1,3 @@
|
||||
+# Magic local data for file(1) command.
|
||||
+# Insert here your local magic data. Format is described in magic(5).
|
||||
+
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 155aec4..0f22539 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -1,4 +1,4 @@
|
||||
-MAGIC = $(pkgdatadir)/magic
|
||||
+MAGIC = /etc/magic:$(pkgdatadir)/magic
|
||||
lib_LTLIBRARIES = libmagic.la
|
||||
nodist_include_HEADERS = magic.h
|
||||
|
||||
diff --git a/src/Makefile.in b/src/Makefile.in
|
||||
index b6eeb20..78dce55 100644
|
||||
--- a/src/Makefile.in
|
||||
+++ b/src/Makefile.in
|
||||
@@ -337,7 +337,7 @@ target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
-MAGIC = $(pkgdatadir)/magic
|
||||
+MAGIC = /etc/magic:$(pkgdatadir)/magic
|
||||
lib_LTLIBRARIES = libmagic.la
|
||||
nodist_include_HEADERS = magic.h
|
||||
AM_CPPFLAGS = -DMAGIC='"$(MAGIC)"'
|
||||
diff --git a/src/apprentice.c b/src/apprentice.c
|
||||
index e395854..ecc1214 100644
|
||||
--- a/src/apprentice.c
|
||||
+++ b/src/apprentice.c
|
||||
@@ -454,7 +454,7 @@ apprentice_1(struct magic_set *ms, const char *fn, int action)
|
||||
if (map == (struct magic_map *)-1)
|
||||
return -1;
|
||||
if (map == NULL) {
|
||||
- if (ms->flags & MAGIC_CHECK)
|
||||
+ if (ms->flags & MAGIC_CHECK && strcmp("/etc/magic", fn) != 0)
|
||||
file_magwarn(ms, "using regular magic file `%s'", fn);
|
||||
map = apprentice_load(ms, fn, action);
|
||||
if (map == NULL)
|
||||
--
|
||||
2.5.5
|
||||
|
||||
13
SOURCES/file-magic-filesystems.patch
Normal file
13
SOURCES/file-magic-filesystems.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/magic/Magdir/filesystems b/magic/Magdir/filesystems
|
||||
index eb41868f..44805a35 100644
|
||||
--- a/magic/Magdir/filesystems
|
||||
+++ b/magic/Magdir/filesystems
|
||||
@@ -1973,7 +1973,7 @@
|
||||
# to display CD-ROM (70=81-11) after MBR (113=40+72+1), partition-table (71=50+21) and before Apple Driver Map (51)
|
||||
#!:strength -11
|
||||
# to display CD-ROM (114=81+33) before MBR (113=40+72+1), partition-table (71=50+21) and Apple Driver Map (51)
|
||||
-!:strength +34
|
||||
+!:strength +35
|
||||
>0 use cdrom
|
||||
|
||||
# URL: https://en.wikipedia.org/wiki/NRG_(file_format)
|
||||
1176
SPECS/file.spec
Normal file
1176
SPECS/file.spec
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user