SHA256
1
0
forked from pool/file

Accepting request 616455 from Base:System

- Update to file version 5.33
  * extend the support for ${x?:} expansions for magic descriptions
  * add support for ${x?:} in mime types to handle
    pie binaries.
  * add support for negative offsets (offsets from the end of file)
  * close the file on error when writing magic (Steve Grubb)
  * seccomp support (Paul Moore)
- Rename patch file-5.32.dif to file-5.33.dif
- Remove patch file-5.32-ncurses-6.1.patch now upstream
- Modify and port patches
  * file-5.12-zip.dif
  * file-5.16-ocloexec.patch
  * file-5.17-option.dif
  * file-5.19-biorad.dif
  * file-5.19-printf.dif
  * file-5.19-zip2.0.dif
  * file-5.22-elf.dif
  * file-5.24-nitpick.dif
- Add patch file-a642587a9c.patch for bsc#1096974, bsc#1096984, and
  CVE-2018-10360 -- Avoid reading past the end of buffer

- Correct version of file which is now 5.33

OBS-URL: https://build.opensuse.org/request/show/616455
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/file?expand=0&rev=108
This commit is contained in:
Dominique Leuenberger 2018-07-14 18:13:42 +00:00 committed by Git OBS Bridge
commit 98973c5735
17 changed files with 125 additions and 99 deletions

View File

@ -3,8 +3,8 @@
1 file changed, 19 insertions(+) 1 file changed, 19 insertions(+)
--- magic/Magdir/archive --- magic/Magdir/archive
+++ magic/Magdir/archive 2016-04-18 11:37:48.369637727 +0000 +++ magic/Magdir/archive 2018-06-12 14:15:56.676369965 +0000
@@ -776,6 +776,25 @@ @@ -1020,6 +1020,25 @@
!:mime application/zip !:mime application/zip
!:ext zip/cbz !:ext zip/cbz
0 string PK\003\004 0 string PK\003\004

View File

@ -6,7 +6,7 @@
4 files changed, 6 insertions(+), 6 deletions(-) 4 files changed, 6 insertions(+), 6 deletions(-)
--- src/apprentice.c --- src/apprentice.c
+++ src/apprentice.c 2017-09-13 10:32:02.149905845 +0000 +++ src/apprentice.c 2018-06-12 14:21:21.286557983 +0000
@@ -1146,7 +1146,7 @@ load_1(struct magic_set *ms, int action, @@ -1146,7 +1146,7 @@ load_1(struct magic_set *ms, int action,
ssize_t len; ssize_t len;
struct magic_entry me; struct magic_entry me;
@ -16,7 +16,7 @@
if (f == NULL) { if (f == NULL) {
if (errno != ENOENT) if (errno != ENOENT)
file_error(ms, errno, "cannot read magic file `%s'", file_error(ms, errno, "cannot read magic file `%s'",
@@ -3032,7 +3032,7 @@ apprentice_map(struct magic_set *ms, con @@ -3045,7 +3045,7 @@ apprentice_map(struct magic_set *ms, con
if (dbname == NULL) if (dbname == NULL)
goto error; goto error;
@ -25,7 +25,7 @@
goto error; goto error;
if (fstat(fd, &st) == -1) { if (fstat(fd, &st) == -1) {
@@ -3169,7 +3169,7 @@ apprentice_compile(struct magic_set *ms, @@ -3182,7 +3182,7 @@ apprentice_compile(struct magic_set *ms,
if (dbname == NULL) if (dbname == NULL)
goto out; goto out;
@ -35,8 +35,8 @@
file_error(ms, errno, "cannot open `%s'", dbname); file_error(ms, errno, "cannot open `%s'", dbname);
goto out; goto out;
--- src/compress.c --- src/compress.c
+++ src/compress.c 2017-09-13 10:32:02.149905845 +0000 +++ src/compress.c 2018-06-12 14:21:21.286557983 +0000
@@ -394,7 +394,7 @@ file_pipe2file(struct magic_set *ms, int @@ -396,7 +396,7 @@ file_pipe2file(struct magic_set *ms, int
#else #else
{ {
int te; int te;
@ -46,18 +46,18 @@
(void)unlink(buf); (void)unlink(buf);
errno = te; errno = te;
--- src/file.c --- src/file.c
+++ src/file.c 2017-09-13 10:32:02.149905845 +0000 +++ src/file.c 2018-06-12 14:22:13.777618129 +0000
@@ -471,7 +471,7 @@ unwrap(struct magic_set *ms, const char @@ -496,7 +496,7 @@ unwrap(struct magic_set *ms, const char
f = stdin; f = stdin;
wid = 1; wid = 1;
} else { } else {
- if ((f = fopen(fn, "r")) == NULL) { - if ((f = fopen(fn, "r")) == NULL) {
+ if ((f = fopen(fn, "re")) == NULL) { + if ((f = fopen(fn, "re")) == NULL) {
(void)fprintf(stderr, "%s: Cannot open `%s' (%s).\n", file_warn("Cannot open `%s'", fn);
progname, fn, strerror(errno));
return 1; return 1;
}
--- src/magic.c --- src/magic.c
+++ src/magic.c 2017-09-13 10:32:02.149905845 +0000 +++ src/magic.c 2018-06-12 14:21:21.286557983 +0000
@@ -442,7 +442,7 @@ file_or_fd(struct magic_set *ms, const c @@ -442,7 +442,7 @@ file_or_fd(struct magic_set *ms, const c
else else
pos = lseek(fd, (off_t)0, SEEK_CUR); pos = lseek(fd, (off_t)0, SEEK_CUR);

View File

@ -3,8 +3,8 @@
1 file changed, 7 insertions(+), 1 deletion(-) 1 file changed, 7 insertions(+), 1 deletion(-)
--- src/file.c --- src/file.c
+++ src/file.c 2016-06-01 10:13:21.169126906 +0000 +++ src/file.c 2018-06-12 14:16:45.847489541 +0000
@@ -225,6 +225,8 @@ main(int argc, char *argv[]) @@ -242,6 +242,8 @@ main(int argc, char *argv[])
flags |= MAGIC_ERROR; flags |= MAGIC_ERROR;
break; break;
case 'e': case 'e':
@ -13,7 +13,7 @@
for (i = 0; i < sizeof(nv) / sizeof(nv[0]); i++) for (i = 0; i < sizeof(nv) / sizeof(nv[0]); i++)
if (strcmp(nv[i].name, optarg) == 0) if (strcmp(nv[i].name, optarg) == 0)
break; break;
@@ -236,7 +238,7 @@ main(int argc, char *argv[]) @@ -253,7 +255,7 @@ main(int argc, char *argv[])
break; break;
case 'f': case 'f':
@ -22,7 +22,7 @@
usage(); usage();
if (magic == NULL) if (magic == NULL)
if ((magic = load(magicfile, flags)) == NULL) if ((magic = load(magicfile, flags)) == NULL)
@@ -246,6 +248,8 @@ main(int argc, char *argv[]) @@ -263,6 +265,8 @@ main(int argc, char *argv[])
++didsomefiles; ++didsomefiles;
break; break;
case 'F': case 'F':
@ -31,7 +31,7 @@
separator = optarg; separator = optarg;
break; break;
case 'i': case 'i':
@@ -258,6 +262,8 @@ main(int argc, char *argv[]) @@ -275,6 +279,8 @@ main(int argc, char *argv[])
action = FILE_LIST; action = FILE_LIST;
break; break;
case 'm': case 'm':

View File

@ -3,8 +3,8 @@
1 file changed, 2 insertions(+) 1 file changed, 2 insertions(+)
--- magic/Magdir/images --- magic/Magdir/images
+++ magic/Magdir/images 2017-09-13 10:31:09.318884599 +0000 +++ magic/Magdir/images 2018-06-12 14:20:39.967297749 +0000
@@ -1021,6 +1021,8 @@ @@ -1017,6 +1017,8 @@
# http://web.archive.org/web/20050317223257/www.cs.ubc.ca/spider/ladic/text/biorad.txt # http://web.archive.org/web/20050317223257/www.cs.ubc.ca/spider/ladic/text/biorad.txt
# Samples: http://www.loci.wisc.edu/software/sample-data # Samples: http://www.loci.wisc.edu/software/sample-data
14 leshort <2 14 leshort <2

View File

@ -3,8 +3,8 @@
1 file changed, 6 insertions(+) 1 file changed, 6 insertions(+)
--- src/apprentice.c --- src/apprentice.c
+++ src/apprentice.c 2017-09-13 10:30:42.203386956 +0000 +++ src/apprentice.c 2018-06-12 14:15:19.109042630 +0000
@@ -2400,6 +2400,12 @@ check_format_type(const char *ptr, int t @@ -2411,6 +2411,12 @@ check_format_type(const char *ptr, int t
ptr++; ptr++;
if (*ptr == '#') if (*ptr == '#')
ptr++; ptr++;

View File

@ -3,8 +3,8 @@
1 file changed, 5 insertions(+) 1 file changed, 5 insertions(+)
--- magic/Magdir/archive --- magic/Magdir/archive
+++ magic/Magdir/archive 2016-04-18 11:39:51.791354756 +0000 +++ magic/Magdir/archive 2018-06-12 14:17:31.598670365 +0000
@@ -770,6 +770,11 @@ @@ -1014,6 +1014,11 @@
0 string PK\x07\x08PK\x03\x04 Zip multi-volume archive data, at least PKZIP v2.50 to extract 0 string PK\x07\x08PK\x03\x04 Zip multi-volume archive data, at least PKZIP v2.50 to extract
!:mime application/zip !:mime application/zip
!:ext zip/cbz !:ext zip/cbz

View File

@ -3,8 +3,8 @@
1 file changed, 4 insertions(+), 2 deletions(-) 1 file changed, 4 insertions(+), 2 deletions(-)
--- src/readelf.c --- src/readelf.c
+++ src/readelf.c 2016-11-24 09:07:31.806925998 +0000 +++ src/readelf.c 2018-06-12 14:14:14.054207494 +0000
@@ -742,7 +742,7 @@ do_core_note(struct magic_set *ms, unsig @@ -743,7 +743,7 @@ do_core_note(struct magic_set *ms, unsig
default: default:
if (type == NT_PRPSINFO && *flags & FLAGS_IS_CORE) { if (type == NT_PRPSINFO && *flags & FLAGS_IS_CORE) {
@ -13,7 +13,7 @@
unsigned char c; unsigned char c;
/* /*
* Extract the program name. We assume * Extract the program name. We assume
@@ -754,7 +754,9 @@ do_core_note(struct magic_set *ms, unsig @@ -755,7 +755,9 @@ do_core_note(struct magic_set *ms, unsig
* If the characters aren't all printable, * If the characters aren't all printable,
* reject it. * reject it.
*/ */

View File

@ -4,8 +4,8 @@
2 files changed, 10 insertions(+), 2 deletions(-) 2 files changed, 10 insertions(+), 2 deletions(-)
--- src/file.c --- src/file.c
+++ src/file.c 2016-11-24 09:11:40.741887920 +0000 +++ src/file.c 2018-06-12 14:32:11.918707401 +0000
@@ -96,10 +96,12 @@ private const struct option long_options @@ -108,10 +108,12 @@ private const struct option long_options
#define OPT_MIME_ENCODING 5 #define OPT_MIME_ENCODING 5
#define OPT(shortname, longname, opt, def, doc) \ #define OPT(shortname, longname, opt, def, doc) \
{longname, opt, NULL, shortname}, {longname, opt, NULL, shortname},
@ -17,8 +17,8 @@
+#undef OPT_POSIX +#undef OPT_POSIX
#undef OPT_LONGONLY #undef OPT_LONGONLY
{0, 0, NULL, 0} {0, 0, NULL, 0}
}; };
@@ -621,6 +623,7 @@ docprint(const char *opts, int def) @@ -646,6 +648,7 @@ docprint(const char *opts, int def)
private void private void
help(void) help(void)
{ {
@ -26,7 +26,7 @@
(void)fputs( (void)fputs(
"Usage: file [OPTION...] [FILE...]\n" "Usage: file [OPTION...] [FILE...]\n"
"Determine type of FILEs.\n" "Determine type of FILEs.\n"
@@ -628,11 +631,16 @@ help(void) @@ -653,11 +656,16 @@ help(void)
#define OPT(shortname, longname, opt, def, doc) \ #define OPT(shortname, longname, opt, def, doc) \
fprintf(stdout, " -%c, --" longname, shortname), \ fprintf(stdout, " -%c, --" longname, shortname), \
docprint(doc, def); docprint(doc, def);
@ -42,9 +42,9 @@
+#undef OPT_POSIX +#undef OPT_POSIX
#undef OPT_LONGONLY #undef OPT_LONGONLY
fprintf(stdout, "\nReport bugs to http://bugs.gw.com/\n"); fprintf(stdout, "\nReport bugs to http://bugs.gw.com/\n");
exit(0); exit(EXIT_SUCCESS);
--- src/file_opts.h --- src/file_opts.h
+++ src/file_opts.h 2016-11-24 09:11:40.741887920 +0000 +++ src/file_opts.h 2018-06-12 14:23:04.096699503 +0000
@@ -36,8 +36,8 @@ OPT_LONGONLY("mime-encoding", 0, 0, " @@ -36,8 +36,8 @@ OPT_LONGONLY("mime-encoding", 0, 0, "
OPT('k', "keep-going", 0, 0, " don't stop at the first match\n") OPT('k', "keep-going", 0, 0, " don't stop at the first match\n")
OPT('l', "list", 0, 0, " list magic strength\n") OPT('l', "list", 0, 0, " list magic strength\n")

View File

@ -1,24 +0,0 @@
---
magic/Magdir/terminfo | 11 +++++++++++
1 file changed, 11 insertions(+)
--- magic/Magdir/terminfo
+++ magic/Magdir/terminfo 2018-01-22 10:32:38.596762352 +0000
@@ -19,6 +19,17 @@
# no extension
#!:ext
#
+#------------------------------------------------------------------------------
+# The following was added for ncurses6 development:
+#------------------------------------------------------------------------------
+#
+0 string \036\002
+# imitate the legacy compiled-format, to get the entry-name printed
+>16 ubyte >32
+# namelist, if more than 1 separated by "|" like "st|stterm| simpleterm 0.4.1"
+>>12 regex \^[a-zA-Z0-9][a-zA-Z0-9.][^|]* Compiled 32-bit terminfo entry "%-s"
+!:mime application/x-terminfo2
+#
# While the compiled terminfo uses little-endian format irregardless of
# platform, SystemV screen dumps do not. They came later, and that detail was
# overlooked.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8639dc4d1b21e232285cd483604afc4a6ee810710e00e579dbe9591681722b50
size 797025

View File

@ -10,8 +10,8 @@
8 files changed, 312 insertions(+), 67 deletions(-) 8 files changed, 312 insertions(+), 67 deletions(-)
--- magic/Magdir/elf --- magic/Magdir/elf
+++ magic/Magdir/elf 2017-09-13 10:34:21.207329793 +0000 +++ magic/Magdir/elf 2018-06-12 14:34:49.439837299 +0000
@@ -128,7 +128,7 @@ @@ -129,7 +129,7 @@
>18 leshort 47 Renesas H8/300H, >18 leshort 47 Renesas H8/300H,
>18 leshort 48 Renesas H8S, >18 leshort 48 Renesas H8S,
>18 leshort 49 Renesas H8/500, >18 leshort 49 Renesas H8/500,
@ -21,7 +21,7 @@
>18 leshort 52 Motorola Coldfire, >18 leshort 52 Motorola Coldfire,
>18 leshort 53 Motorola M68HC12, >18 leshort 53 Motorola M68HC12,
--- magic/Magdir/linux --- magic/Magdir/linux
+++ magic/Magdir/linux 2017-09-13 10:34:21.207329793 +0000 +++ magic/Magdir/linux 2018-06-12 14:34:49.439837299 +0000
@@ -101,23 +101,27 @@ @@ -101,23 +101,27 @@
# and Nicolas Lichtmaier <nick@debian.org> # and Nicolas Lichtmaier <nick@debian.org>
# All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29 # All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
@ -67,7 +67,7 @@
0 belong 0xb8c0078e Linux kernel 0 belong 0xb8c0078e Linux kernel
>0x1e3 string Loading version 1.3.79 or older >0x1e3 string Loading version 1.3.79 or older
--- magic/Magdir/msad --- magic/Magdir/msad
+++ magic/Magdir/msad 2017-09-13 10:34:21.207329793 +0000 +++ magic/Magdir/msad 2018-06-12 14:34:49.439837299 +0000
@@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
+#------------------------------------------------------------------------------ +#------------------------------------------------------------------------------
+# msad: file(1) magic for msad +# msad: file(1) magic for msad
@ -75,7 +75,7 @@
+# This must precede the heuristic for raw G3 data +# This must precede the heuristic for raw G3 data
+4 string Standard\ Jet\ DB Microsoft Access Database +4 string Standard\ Jet\ DB Microsoft Access Database
--- magic/Magdir/msdos --- magic/Magdir/msdos
+++ magic/Magdir/msdos 2017-09-13 10:34:21.211329718 +0000 +++ magic/Magdir/msdos 2018-06-12 14:34:49.439837299 +0000
@@ -104,9 +104,9 @@ @@ -104,9 +104,9 @@
>>>(0x3c.l+22) leshort&0x0200 >0 (stripped to external PDB) >>>(0x3c.l+22) leshort&0x0200 >0 (stripped to external PDB)
>>>(0x3c.l+22) leshort&0x1000 >0 system file >>>(0x3c.l+22) leshort&0x1000 >0 system file
@ -98,7 +98,7 @@
# updated by Joerg Jenderek at Oct 2008,2015 # updated by Joerg Jenderek at Oct 2008,2015
--- magic/Makefile.am --- magic/Makefile.am
+++ magic/Makefile.am 2017-09-13 10:34:21.211329718 +0000 +++ magic/Makefile.am 2018-06-12 15:09:37.077835298 +0000
@@ -5,7 +5,7 @@ MAGIC_FRAGMENT_BASE = Magdir @@ -5,7 +5,7 @@ MAGIC_FRAGMENT_BASE = Magdir
MAGIC_DIR = $(top_srcdir)/magic MAGIC_DIR = $(top_srcdir)/magic
MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE) MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE)
@ -116,7 +116,7 @@
$(MAGIC_FRAGMENT_DIR)/application \ $(MAGIC_FRAGMENT_DIR)/application \
$(MAGIC_FRAGMENT_DIR)/applix \ $(MAGIC_FRAGMENT_DIR)/applix \
$(MAGIC_FRAGMENT_DIR)/apt \ $(MAGIC_FRAGMENT_DIR)/apt \
@@ -87,7 +86,6 @@ $(MAGIC_FRAGMENT_DIR)/epoc \ @@ -89,7 +88,6 @@ $(MAGIC_FRAGMENT_DIR)/epoc \
$(MAGIC_FRAGMENT_DIR)/erlang \ $(MAGIC_FRAGMENT_DIR)/erlang \
$(MAGIC_FRAGMENT_DIR)/esri \ $(MAGIC_FRAGMENT_DIR)/esri \
$(MAGIC_FRAGMENT_DIR)/fcs \ $(MAGIC_FRAGMENT_DIR)/fcs \
@ -124,7 +124,7 @@
$(MAGIC_FRAGMENT_DIR)/finger \ $(MAGIC_FRAGMENT_DIR)/finger \
$(MAGIC_FRAGMENT_DIR)/flash \ $(MAGIC_FRAGMENT_DIR)/flash \
$(MAGIC_FRAGMENT_DIR)/flif \ $(MAGIC_FRAGMENT_DIR)/flif \
@@ -129,6 +127,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \ @@ -131,6 +129,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \
$(MAGIC_FRAGMENT_DIR)/java \ $(MAGIC_FRAGMENT_DIR)/java \
$(MAGIC_FRAGMENT_DIR)/javascript \ $(MAGIC_FRAGMENT_DIR)/javascript \
$(MAGIC_FRAGMENT_DIR)/jpeg \ $(MAGIC_FRAGMENT_DIR)/jpeg \
@ -133,7 +133,7 @@
$(MAGIC_FRAGMENT_DIR)/karma \ $(MAGIC_FRAGMENT_DIR)/karma \
$(MAGIC_FRAGMENT_DIR)/kde \ $(MAGIC_FRAGMENT_DIR)/kde \
$(MAGIC_FRAGMENT_DIR)/keepass \ $(MAGIC_FRAGMENT_DIR)/keepass \
@@ -137,7 +137,6 @@ $(MAGIC_FRAGMENT_DIR)/kml \ @@ -139,7 +139,6 @@ $(MAGIC_FRAGMENT_DIR)/kml \
$(MAGIC_FRAGMENT_DIR)/lecter \ $(MAGIC_FRAGMENT_DIR)/lecter \
$(MAGIC_FRAGMENT_DIR)/lex \ $(MAGIC_FRAGMENT_DIR)/lex \
$(MAGIC_FRAGMENT_DIR)/lif \ $(MAGIC_FRAGMENT_DIR)/lif \
@ -141,7 +141,7 @@
$(MAGIC_FRAGMENT_DIR)/lisp \ $(MAGIC_FRAGMENT_DIR)/lisp \
$(MAGIC_FRAGMENT_DIR)/llvm \ $(MAGIC_FRAGMENT_DIR)/llvm \
$(MAGIC_FRAGMENT_DIR)/lua \ $(MAGIC_FRAGMENT_DIR)/lua \
@@ -145,7 +144,6 @@ $(MAGIC_FRAGMENT_DIR)/luks \ @@ -147,7 +146,6 @@ $(MAGIC_FRAGMENT_DIR)/luks \
$(MAGIC_FRAGMENT_DIR)/m4 \ $(MAGIC_FRAGMENT_DIR)/m4 \
$(MAGIC_FRAGMENT_DIR)/mach \ $(MAGIC_FRAGMENT_DIR)/mach \
$(MAGIC_FRAGMENT_DIR)/macos \ $(MAGIC_FRAGMENT_DIR)/macos \
@ -149,7 +149,7 @@
$(MAGIC_FRAGMENT_DIR)/magic \ $(MAGIC_FRAGMENT_DIR)/magic \
$(MAGIC_FRAGMENT_DIR)/mail.news \ $(MAGIC_FRAGMENT_DIR)/mail.news \
$(MAGIC_FRAGMENT_DIR)/make \ $(MAGIC_FRAGMENT_DIR)/make \
@@ -167,10 +165,10 @@ $(MAGIC_FRAGMENT_DIR)/misctools \ @@ -170,10 +168,10 @@ $(MAGIC_FRAGMENT_DIR)/misctools \
$(MAGIC_FRAGMENT_DIR)/mkid \ $(MAGIC_FRAGMENT_DIR)/mkid \
$(MAGIC_FRAGMENT_DIR)/mlssa \ $(MAGIC_FRAGMENT_DIR)/mlssa \
$(MAGIC_FRAGMENT_DIR)/mmdf \ $(MAGIC_FRAGMENT_DIR)/mmdf \
@ -161,17 +161,17 @@
$(MAGIC_FRAGMENT_DIR)/msooxml \ $(MAGIC_FRAGMENT_DIR)/msooxml \
$(MAGIC_FRAGMENT_DIR)/msx \ $(MAGIC_FRAGMENT_DIR)/msx \
$(MAGIC_FRAGMENT_DIR)/msvc \ $(MAGIC_FRAGMENT_DIR)/msvc \
@@ -222,6 +220,8 @@ $(MAGIC_FRAGMENT_DIR)/python \ @@ -225,6 +223,8 @@ $(MAGIC_FRAGMENT_DIR)/python \
$(MAGIC_FRAGMENT_DIR)/qt \ $(MAGIC_FRAGMENT_DIR)/qt \
$(MAGIC_FRAGMENT_DIR)/revision \ $(MAGIC_FRAGMENT_DIR)/revision \
$(MAGIC_FRAGMENT_DIR)/riff \ $(MAGIC_FRAGMENT_DIR)/riff \
+$(MAGIC_FRAGMENT_DIR)/apple \ +$(MAGIC_FRAGMENT_DIR)/apple \
+$(MAGIC_FRAGMENT_DIR)/macintosh \ +$(MAGIC_FRAGMENT_DIR)/macintosh \
$(MAGIC_FRAGMENT_DIR)/rpi \
$(MAGIC_FRAGMENT_DIR)/rpm \ $(MAGIC_FRAGMENT_DIR)/rpm \
$(MAGIC_FRAGMENT_DIR)/rtf \ $(MAGIC_FRAGMENT_DIR)/rtf \
$(MAGIC_FRAGMENT_DIR)/ruby \ @@ -301,8 +301,20 @@ $(MAGIC_FRAGMENT_DIR)/zilog \
@@ -295,8 +295,20 @@ $(MAGIC_FRAGMENT_DIR)/zfs \ $(MAGIC_FRAGMENT_DIR)/zip \
$(MAGIC_FRAGMENT_DIR)/zilog \
$(MAGIC_FRAGMENT_DIR)/zyxel $(MAGIC_FRAGMENT_DIR)/zyxel
+RAW = magic +RAW = magic
@ -192,7 +192,7 @@
# FIXME: Build file natively as well so that it can be used to compile # FIXME: Build file natively as well so that it can be used to compile
# the target's magic file; for now we bail if the local version does not match # the target's magic file; for now we bail if the local version does not match
@@ -308,19 +320,22 @@ FILE_COMPILE = $(top_builddir)/src/file$ @@ -314,19 +326,22 @@ FILE_COMPILE = $(top_builddir)/src/file$
FILE_COMPILE_DEP = $(FILE_COMPILE) FILE_COMPILE_DEP = $(FILE_COMPILE)
endif endif
@ -232,8 +232,8 @@
+# $(FILE_COMPILE) -C -m magic +# $(FILE_COMPILE) -C -m magic
+# @rm -fr magic +# @rm -fr magic
--- magic/Makefile.in --- magic/Makefile.in
+++ magic/Makefile.in 2017-09-13 10:34:21.211329718 +0000 +++ magic/Makefile.in 2018-06-12 15:13:56.753087818 +0000
@@ -278,7 +278,7 @@ top_srcdir = @top_srcdir@ @@ -237,7 +237,7 @@ top_srcdir = @top_srcdir@
MAGIC_FRAGMENT_BASE = Magdir MAGIC_FRAGMENT_BASE = Magdir
MAGIC_DIR = $(top_srcdir)/magic MAGIC_DIR = $(top_srcdir)/magic
MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE) MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE)
@ -242,7 +242,7 @@
EXTRA_DIST = \ EXTRA_DIST = \
$(MAGIC_DIR)/Header \ $(MAGIC_DIR)/Header \
$(MAGIC_DIR)/Localstuff \ $(MAGIC_DIR)/Localstuff \
@@ -295,7 +295,6 @@ $(MAGIC_FRAGMENT_DIR)/animation \ @@ -254,7 +254,6 @@ $(MAGIC_FRAGMENT_DIR)/animation \
$(MAGIC_FRAGMENT_DIR)/aout \ $(MAGIC_FRAGMENT_DIR)/aout \
$(MAGIC_FRAGMENT_DIR)/apache \ $(MAGIC_FRAGMENT_DIR)/apache \
$(MAGIC_FRAGMENT_DIR)/apl \ $(MAGIC_FRAGMENT_DIR)/apl \
@ -250,7 +250,7 @@
$(MAGIC_FRAGMENT_DIR)/application \ $(MAGIC_FRAGMENT_DIR)/application \
$(MAGIC_FRAGMENT_DIR)/applix \ $(MAGIC_FRAGMENT_DIR)/applix \
$(MAGIC_FRAGMENT_DIR)/apt \ $(MAGIC_FRAGMENT_DIR)/apt \
@@ -359,7 +358,6 @@ $(MAGIC_FRAGMENT_DIR)/epoc \ @@ -320,7 +319,6 @@ $(MAGIC_FRAGMENT_DIR)/epoc \
$(MAGIC_FRAGMENT_DIR)/erlang \ $(MAGIC_FRAGMENT_DIR)/erlang \
$(MAGIC_FRAGMENT_DIR)/esri \ $(MAGIC_FRAGMENT_DIR)/esri \
$(MAGIC_FRAGMENT_DIR)/fcs \ $(MAGIC_FRAGMENT_DIR)/fcs \
@ -258,7 +258,7 @@
$(MAGIC_FRAGMENT_DIR)/finger \ $(MAGIC_FRAGMENT_DIR)/finger \
$(MAGIC_FRAGMENT_DIR)/flash \ $(MAGIC_FRAGMENT_DIR)/flash \
$(MAGIC_FRAGMENT_DIR)/flif \ $(MAGIC_FRAGMENT_DIR)/flif \
@@ -401,6 +399,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \ @@ -362,6 +360,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \
$(MAGIC_FRAGMENT_DIR)/java \ $(MAGIC_FRAGMENT_DIR)/java \
$(MAGIC_FRAGMENT_DIR)/javascript \ $(MAGIC_FRAGMENT_DIR)/javascript \
$(MAGIC_FRAGMENT_DIR)/jpeg \ $(MAGIC_FRAGMENT_DIR)/jpeg \
@ -267,7 +267,7 @@
$(MAGIC_FRAGMENT_DIR)/karma \ $(MAGIC_FRAGMENT_DIR)/karma \
$(MAGIC_FRAGMENT_DIR)/kde \ $(MAGIC_FRAGMENT_DIR)/kde \
$(MAGIC_FRAGMENT_DIR)/keepass \ $(MAGIC_FRAGMENT_DIR)/keepass \
@@ -409,7 +409,6 @@ $(MAGIC_FRAGMENT_DIR)/kml \ @@ -370,7 +370,6 @@ $(MAGIC_FRAGMENT_DIR)/kml \
$(MAGIC_FRAGMENT_DIR)/lecter \ $(MAGIC_FRAGMENT_DIR)/lecter \
$(MAGIC_FRAGMENT_DIR)/lex \ $(MAGIC_FRAGMENT_DIR)/lex \
$(MAGIC_FRAGMENT_DIR)/lif \ $(MAGIC_FRAGMENT_DIR)/lif \
@ -275,7 +275,7 @@
$(MAGIC_FRAGMENT_DIR)/lisp \ $(MAGIC_FRAGMENT_DIR)/lisp \
$(MAGIC_FRAGMENT_DIR)/llvm \ $(MAGIC_FRAGMENT_DIR)/llvm \
$(MAGIC_FRAGMENT_DIR)/lua \ $(MAGIC_FRAGMENT_DIR)/lua \
@@ -417,7 +416,6 @@ $(MAGIC_FRAGMENT_DIR)/luks \ @@ -378,7 +377,6 @@ $(MAGIC_FRAGMENT_DIR)/luks \
$(MAGIC_FRAGMENT_DIR)/m4 \ $(MAGIC_FRAGMENT_DIR)/m4 \
$(MAGIC_FRAGMENT_DIR)/mach \ $(MAGIC_FRAGMENT_DIR)/mach \
$(MAGIC_FRAGMENT_DIR)/macos \ $(MAGIC_FRAGMENT_DIR)/macos \
@ -283,7 +283,7 @@
$(MAGIC_FRAGMENT_DIR)/magic \ $(MAGIC_FRAGMENT_DIR)/magic \
$(MAGIC_FRAGMENT_DIR)/mail.news \ $(MAGIC_FRAGMENT_DIR)/mail.news \
$(MAGIC_FRAGMENT_DIR)/make \ $(MAGIC_FRAGMENT_DIR)/make \
@@ -439,10 +437,10 @@ $(MAGIC_FRAGMENT_DIR)/misctools \ @@ -401,10 +399,10 @@ $(MAGIC_FRAGMENT_DIR)/misctools \
$(MAGIC_FRAGMENT_DIR)/mkid \ $(MAGIC_FRAGMENT_DIR)/mkid \
$(MAGIC_FRAGMENT_DIR)/mlssa \ $(MAGIC_FRAGMENT_DIR)/mlssa \
$(MAGIC_FRAGMENT_DIR)/mmdf \ $(MAGIC_FRAGMENT_DIR)/mmdf \
@ -295,23 +295,23 @@
$(MAGIC_FRAGMENT_DIR)/msooxml \ $(MAGIC_FRAGMENT_DIR)/msooxml \
$(MAGIC_FRAGMENT_DIR)/msx \ $(MAGIC_FRAGMENT_DIR)/msx \
$(MAGIC_FRAGMENT_DIR)/msvc \ $(MAGIC_FRAGMENT_DIR)/msvc \
@@ -494,6 +492,8 @@ $(MAGIC_FRAGMENT_DIR)/python \ @@ -456,6 +454,8 @@ $(MAGIC_FRAGMENT_DIR)/python \
$(MAGIC_FRAGMENT_DIR)/qt \ $(MAGIC_FRAGMENT_DIR)/qt \
$(MAGIC_FRAGMENT_DIR)/revision \ $(MAGIC_FRAGMENT_DIR)/revision \
$(MAGIC_FRAGMENT_DIR)/riff \ $(MAGIC_FRAGMENT_DIR)/riff \
+$(MAGIC_FRAGMENT_DIR)/apple \ +$(MAGIC_FRAGMENT_DIR)/apple \
+$(MAGIC_FRAGMENT_DIR)/macintosh \ +$(MAGIC_FRAGMENT_DIR)/macintosh \
$(MAGIC_FRAGMENT_DIR)/rpi \
$(MAGIC_FRAGMENT_DIR)/rpm \ $(MAGIC_FRAGMENT_DIR)/rpm \
$(MAGIC_FRAGMENT_DIR)/rtf \ $(MAGIC_FRAGMENT_DIR)/rtf \
$(MAGIC_FRAGMENT_DIR)/ruby \ @@ -532,10 +532,22 @@ $(MAGIC_FRAGMENT_DIR)/zilog \
@@ -567,10 +567,22 @@ $(MAGIC_FRAGMENT_DIR)/zfs \ $(MAGIC_FRAGMENT_DIR)/zip \
$(MAGIC_FRAGMENT_DIR)/zilog \
$(MAGIC_FRAGMENT_DIR)/zyxel $(MAGIC_FRAGMENT_DIR)/zyxel
+RAW = magic +RAW = magic
MAGIC = magic.mgc MAGIC = magic.mgc
-CLEANFILES = ${MAGIC} $(MAGIC_FRAGMENT_DIR)/Localstuff -CLEANFILES = ${MAGIC} $(MAGIC_FRAGMENT_DIR)/Localstuff
+CLEANFILES = ${MAGIC} $(MAGIC_FRAGMENT_DIR)/Localstuff ${RAW} +CLEANFILES = ${MAGIC} $(MAGIC_DIR)/Localstuff ${RAW}
@IS_CROSS_COMPILE_FALSE@FILE_COMPILE = $(top_builddir)/src/file${EXEEXT} @IS_CROSS_COMPILE_FALSE@FILE_COMPILE = $(top_builddir)/src/file${EXEEXT}
+${RAW}: $(MAGIC_DIR)/Header $(MAGIC_DIR)/Localstuff $(EXTRA_DIST) +${RAW}: $(MAGIC_DIR)/Header $(MAGIC_DIR)/Localstuff $(EXTRA_DIST)
@ -328,9 +328,9 @@
# FIXME: Build file natively as well so that it can be used to compile # FIXME: Build file natively as well so that it can be used to compile
# the target's magic file; for now we bail if the local version does not match # the target's magic file; for now we bail if the local version does not match
@IS_CROSS_COMPILE_TRUE@FILE_COMPILE = file${EXEEXT} @IS_CROSS_COMPILE_TRUE@FILE_COMPILE = file${EXEEXT}
@@ -792,23 +804,25 @@ uninstall-am: uninstall-pkgdataDATA @@ -756,23 +768,25 @@ uninstall-am: uninstall-pkgdataDATA
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
.PRECIOUS: Makefile ps ps-am tags-am uninstall uninstall-am uninstall-pkgdataDATA
+${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP) $(RAW) +${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP) $(RAW)
+ $(FILE_COMPILE) -C -m $(RAW) + $(FILE_COMPILE) -C -m $(RAW)
@ -371,7 +371,7 @@
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.
--- src/Makefile.am --- src/Makefile.am
+++ src/Makefile.am 2017-09-13 10:34:21.227329422 +0000 +++ src/Makefile.am 2018-06-12 14:34:49.487836425 +0000
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
-MAGIC = $(pkgdatadir)/magic -MAGIC = $(pkgdatadir)/magic
+MAGIC = $(sysconfdir)/magic:$(pkgdatadir)/magic +MAGIC = $(sysconfdir)/magic:$(pkgdatadir)/magic
@ -379,7 +379,7 @@
nodist_include_HEADERS = magic.h nodist_include_HEADERS = magic.h
--- src/dcore.c --- src/dcore.c
+++ src/dcore.c 2017-09-13 10:34:21.227329422 +0000 +++ src/dcore.c 2018-06-12 14:34:49.487836425 +0000
@@ -0,0 +1,207 @@ @@ -0,0 +1,207 @@
+/* +/*
+ * Show goo about ELF core files + * Show goo about ELF core files

3
file-5.33.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1c52c8c3d271cd898d5511c36a68059cda94036111ab293f01f83c3525b737c6
size 817060

20
file-a642587a9c.patch Normal file
View File

@ -0,0 +1,20 @@
commit a642587a9c9e2dd7feacdf513c3643ce26ad3c22
Author: Christos Zoulas <christos@zoulas.com>
Date: Sat Jun 9 16:00:06 2018 +0000
Avoid reading past the end of buffer (Rui Reis)
diff --git src/readelf.c src/readelf.c
index 79c83f9f..1f41b461 100644
--- src/readelf.c
+++ src/readelf.c
@@ -842,7 +842,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

View File

@ -1,3 +1,27 @@
-------------------------------------------------------------------
Tue Jun 12 15:16:15 UTC 2018 - werner@suse.de
- Update to file version 5.33
* extend the support for ${x?:} expansions for magic descriptions
* add support for ${x?:} in mime types to handle
pie binaries.
* add support for negative offsets (offsets from the end of file)
* close the file on error when writing magic (Steve Grubb)
* seccomp support (Paul Moore)
- Rename patch file-5.32.dif to file-5.33.dif
- Remove patch file-5.32-ncurses-6.1.patch now upstream
- Modify and port patches
* file-5.12-zip.dif
* file-5.16-ocloexec.patch
* file-5.17-option.dif
* file-5.19-biorad.dif
* file-5.19-printf.dif
* file-5.19-zip2.0.dif
* file-5.22-elf.dif
* file-5.24-nitpick.dif
- Add patch file-a642587a9c.patch for bsc#1096974, bsc#1096984, and
CVE-2018-10360 -- Avoid reading past the end of buffer
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Apr 6 07:08:24 UTC 2018 - werner@suse.de Fri Apr 6 07:08:24 UTC 2018 - werner@suse.de

View File

@ -30,7 +30,7 @@ Obsoletes: file-64bit
%endif %endif
# #
# Set Version also in python-magic.spec # Set Version also in python-magic.spec
Version: 5.32 Version: 5.33
Release: 0 Release: 0
Summary: A Tool to Determine File Types Summary: A Tool to Determine File Types
License: BSD-2-Clause License: BSD-2-Clause
@ -38,7 +38,7 @@ Group: Productivity/File utilities
Source: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz Source: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
Source2: baselibs.conf Source2: baselibs.conf
Source3: file-rpmlintrc Source3: file-rpmlintrc
Patch: file-5.32.dif Patch: file-5.33.dif
Patch1: file-5.19-misc.dif Patch1: file-5.19-misc.dif
Patch4: file-4.24-autoconf.dif Patch4: file-4.24-autoconf.dif
Patch5: file-5.14-tex.dif Patch5: file-5.14-tex.dif
@ -62,7 +62,8 @@ Patch35: file-5.24-nitpick.dif
Patch36: file-5.15-clear-invalid.patch Patch36: file-5.15-clear-invalid.patch
Patch37: file-secure_getenv.patch Patch37: file-secure_getenv.patch
Patch39: file-5.28-btrfs-image.dif Patch39: file-5.28-btrfs-image.dif
Patch40: file-5.32-ncurses-6.1.patch # PATCH-FIX-USTREAM or bsc#1096974, bsc#1096984, and CVE-2018-10360 -- Avoid reading past the end of buffer
Patch54: file-a642587a9c.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%global _sysconfdir /etc %global _sysconfdir /etc
%global _miscdir %{_datadir}/misc %global _miscdir %{_datadir}/misc
@ -131,7 +132,7 @@ to develop applications that require the magic "file" interface.
%patch36 -p1 -b .clear %patch36 -p1 -b .clear
%patch37 -p1 -b .getenv %patch37 -p1 -b .getenv
%patch39 -p1 -b .btrfs %patch39 -p1 -b .btrfs
%patch40 -p0 -b .nc61 %patch54
%patch -b .0 %patch -b .0
test -s src/magic.h.in || cp -p src/magic.h src/magic.h.in test -s src/magic.h.in || cp -p src/magic.h src/magic.h.in
rm -fv src/magic.h rm -fv src/magic.h

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Jun 13 07:49:54 UTC 2018 - werner@suse.de
- Correct version of file which is now 5.33
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Sep 26 15:17:29 UTC 2017 - jmatejek@suse.com Tue Sep 26 15:17:29 UTC 2017 - jmatejek@suse.com

View File

@ -28,7 +28,7 @@ BuildRequires: libtool
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
BuildRequires: zlib-devel BuildRequires: zlib-devel
Url: http://www.darwinsys.com/file/ Url: http://www.darwinsys.com/file/
Version: 5.32 Version: 5.33
Release: 0 Release: 0
Summary: Python module to use libmagic Summary: Python module to use libmagic
License: BSD-3-Clause AND BSD-4-Clause License: BSD-3-Clause AND BSD-4-Clause