From owner-svn-src-vendor@freebsd.org Sun Nov 10 03:44:36 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A46F61A8D70; Sun, 10 Nov 2019 03:44:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 479fyX498dz4W2p; Sun, 10 Nov 2019 03:44:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 725D8211A0; Sun, 10 Nov 2019 03:44:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAA3iaBS060272; Sun, 10 Nov 2019 03:44:36 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAA3iWWA060253; Sun, 10 Nov 2019 03:44:32 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201911100344.xAA3iWWA060253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 10 Nov 2019 03:44:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r354582 - in vendor/file/dist: . doc magic magic/Magdir src tests X-SVN-Group: vendor X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in vendor/file/dist: . doc magic magic/Magdir src tests X-SVN-Commit-Revision: 354582 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Nov 2019 03:44:36 -0000 Author: delphij Date: Sun Nov 10 03:44:32 2019 New Revision: 354582 URL: https://svnweb.freebsd.org/changeset/base/354582 Log: Vendor import of file 5.37 Added: vendor/file/dist/magic/Magdir/biosig vendor/file/dist/magic/Magdir/clojure vendor/file/dist/magic/Magdir/edid vendor/file/dist/magic/Magdir/espressif vendor/file/dist/magic/Magdir/glibc vendor/file/dist/magic/Magdir/hardware vendor/file/dist/magic/Magdir/kicad vendor/file/dist/magic/Magdir/numpy vendor/file/dist/magic/Magdir/rpmsg vendor/file/dist/src/is_json.c (contents, props changed) vendor/file/dist/tests/CVE-2014-1943.result vendor/file/dist/tests/CVE-2014-1943.testfile (contents, props changed) vendor/file/dist/tests/fit-map-data.result vendor/file/dist/tests/fit-map-data.testfile (contents, props changed) vendor/file/dist/tests/issue359xlsx.result vendor/file/dist/tests/issue359xlsx.testfile (contents, props changed) vendor/file/dist/tests/json1.result vendor/file/dist/tests/json1.testfile vendor/file/dist/tests/json2.result vendor/file/dist/tests/json2.testfile vendor/file/dist/tests/json3.result vendor/file/dist/tests/json3.testfile vendor/file/dist/tests/regex-eol.magic vendor/file/dist/tests/regex-eol.result vendor/file/dist/tests/regex-eol.testfile vendor/file/dist/tests/zstd-3-skippable-frames.result vendor/file/dist/tests/zstd-dictionary-0.result vendor/file/dist/tests/zstd-dictionary-1.result vendor/file/dist/tests/zstd-dictionary-2.result vendor/file/dist/tests/zstd-skippable-frame-0.result vendor/file/dist/tests/zstd-skippable-frame-4.result vendor/file/dist/tests/zstd-skippable-frame-8.result vendor/file/dist/tests/zstd-skippable-frame-C.result vendor/file/dist/tests/zstd-v0.2-FF.result vendor/file/dist/tests/zstd-v0.2-FF.testfile (contents, props changed) vendor/file/dist/tests/zstd-v0.3-FF.result vendor/file/dist/tests/zstd-v0.3-FF.testfile (contents, props changed) vendor/file/dist/tests/zstd-v0.4-FF.result vendor/file/dist/tests/zstd-v0.4-FF.testfile (contents, props changed) vendor/file/dist/tests/zstd-v0.5-FF.result vendor/file/dist/tests/zstd-v0.5-FF.testfile (contents, props changed) vendor/file/dist/tests/zstd-v0.6-FF.result vendor/file/dist/tests/zstd-v0.6-FF.testfile (contents, props changed) vendor/file/dist/tests/zstd-v0.7-00.result vendor/file/dist/tests/zstd-v0.7-21.result vendor/file/dist/tests/zstd-v0.7-21.testfile (contents, props changed) vendor/file/dist/tests/zstd-v0.7-22.result vendor/file/dist/tests/zstd-v0.7-22.testfile (contents, props changed) vendor/file/dist/tests/zstd-v0.8-00.result vendor/file/dist/tests/zstd-v0.8-01.result vendor/file/dist/tests/zstd-v0.8-01.testfile (contents, props changed) vendor/file/dist/tests/zstd-v0.8-02.result vendor/file/dist/tests/zstd-v0.8-02.testfile (contents, props changed) vendor/file/dist/tests/zstd-v0.8-03.result vendor/file/dist/tests/zstd-v0.8-03.testfile (contents, props changed) vendor/file/dist/tests/zstd-v0.8-16.result vendor/file/dist/tests/zstd-v0.8-16.testfile (contents, props changed) vendor/file/dist/tests/zstd-v0.8-20.result vendor/file/dist/tests/zstd-v0.8-20.testfile (contents, props changed) vendor/file/dist/tests/zstd-v0.8-21.result vendor/file/dist/tests/zstd-v0.8-21.testfile (contents, props changed) vendor/file/dist/tests/zstd-v0.8-22.result vendor/file/dist/tests/zstd-v0.8-22.testfile (contents, props changed) vendor/file/dist/tests/zstd-v0.8-23.result vendor/file/dist/tests/zstd-v0.8-23.testfile (contents, props changed) vendor/file/dist/tests/zstd-v0.8-F4.result vendor/file/dist/tests/zstd-v0.8-F4.testfile (contents, props changed) vendor/file/dist/tests/zstd-v0.8-FF.result vendor/file/dist/tests/zstd-v0.8-FF.testfile (contents, props changed) Modified: vendor/file/dist/AUTHORS vendor/file/dist/COPYING vendor/file/dist/ChangeLog vendor/file/dist/NEWS vendor/file/dist/README vendor/file/dist/config.h.in vendor/file/dist/configure vendor/file/dist/configure.ac vendor/file/dist/doc/file.man vendor/file/dist/doc/libmagic.man vendor/file/dist/doc/magic.man vendor/file/dist/magic/Header vendor/file/dist/magic/Magdir/acorn vendor/file/dist/magic/Magdir/adventure vendor/file/dist/magic/Magdir/algol68 vendor/file/dist/magic/Magdir/amigaos vendor/file/dist/magic/Magdir/android vendor/file/dist/magic/Magdir/animation vendor/file/dist/magic/Magdir/apple vendor/file/dist/magic/Magdir/archive vendor/file/dist/magic/Magdir/audio vendor/file/dist/magic/Magdir/basis vendor/file/dist/magic/Magdir/ber vendor/file/dist/magic/Magdir/bioinformatics vendor/file/dist/magic/Magdir/blcr vendor/file/dist/magic/Magdir/blender vendor/file/dist/magic/Magdir/c-lang vendor/file/dist/magic/Magdir/cad vendor/file/dist/magic/Magdir/cafebabe vendor/file/dist/magic/Magdir/coff vendor/file/dist/magic/Magdir/commands vendor/file/dist/magic/Magdir/compress vendor/file/dist/magic/Magdir/console vendor/file/dist/magic/Magdir/coverage vendor/file/dist/magic/Magdir/ctf vendor/file/dist/magic/Magdir/cups vendor/file/dist/magic/Magdir/database vendor/file/dist/magic/Magdir/dataone vendor/file/dist/magic/Magdir/dbpf vendor/file/dist/magic/Magdir/dolby vendor/file/dist/magic/Magdir/dyadic vendor/file/dist/magic/Magdir/ebml vendor/file/dist/magic/Magdir/elf vendor/file/dist/magic/Magdir/erlang vendor/file/dist/magic/Magdir/esri vendor/file/dist/magic/Magdir/filesystems vendor/file/dist/magic/Magdir/finger vendor/file/dist/magic/Magdir/flash vendor/file/dist/magic/Magdir/fonts vendor/file/dist/magic/Magdir/fsav vendor/file/dist/magic/Magdir/games vendor/file/dist/magic/Magdir/geo vendor/file/dist/magic/Magdir/gnome vendor/file/dist/magic/Magdir/gnu vendor/file/dist/magic/Magdir/graphviz vendor/file/dist/magic/Magdir/guile vendor/file/dist/magic/Magdir/hitachi-sh vendor/file/dist/magic/Magdir/hp vendor/file/dist/magic/Magdir/ibm6000 vendor/file/dist/magic/Magdir/images vendor/file/dist/magic/Magdir/intel vendor/file/dist/magic/Magdir/isz vendor/file/dist/magic/Magdir/java vendor/file/dist/magic/Magdir/jpeg vendor/file/dist/magic/Magdir/keepass vendor/file/dist/magic/Magdir/kerberos vendor/file/dist/magic/Magdir/kml vendor/file/dist/magic/Magdir/linux vendor/file/dist/magic/Magdir/lisp vendor/file/dist/magic/Magdir/llvm vendor/file/dist/magic/Magdir/lua vendor/file/dist/magic/Magdir/m4 vendor/file/dist/magic/Magdir/macintosh vendor/file/dist/magic/Magdir/mail.news vendor/file/dist/magic/Magdir/map vendor/file/dist/magic/Magdir/marc21 vendor/file/dist/magic/Magdir/matroska vendor/file/dist/magic/Magdir/mercurial vendor/file/dist/magic/Magdir/metastore vendor/file/dist/magic/Magdir/microfocus vendor/file/dist/magic/Magdir/misctools vendor/file/dist/magic/Magdir/modem vendor/file/dist/magic/Magdir/mozilla vendor/file/dist/magic/Magdir/msdos vendor/file/dist/magic/Magdir/msooxml vendor/file/dist/magic/Magdir/msvc vendor/file/dist/magic/Magdir/neko vendor/file/dist/magic/Magdir/netbsd vendor/file/dist/magic/Magdir/nitpicker vendor/file/dist/magic/Magdir/ole2compounddocs vendor/file/dist/magic/Magdir/palm vendor/file/dist/magic/Magdir/parrot vendor/file/dist/magic/Magdir/pbf vendor/file/dist/magic/Magdir/pc98 vendor/file/dist/magic/Magdir/pgp vendor/file/dist/magic/Magdir/polyml vendor/file/dist/magic/Magdir/printer vendor/file/dist/magic/Magdir/psl vendor/file/dist/magic/Magdir/pwsafe vendor/file/dist/magic/Magdir/python vendor/file/dist/magic/Magdir/qt vendor/file/dist/magic/Magdir/revision vendor/file/dist/magic/Magdir/riff vendor/file/dist/magic/Magdir/ruby vendor/file/dist/magic/Magdir/scientific vendor/file/dist/magic/Magdir/selinux vendor/file/dist/magic/Magdir/sendmail vendor/file/dist/magic/Magdir/sequent vendor/file/dist/magic/Magdir/sgml vendor/file/dist/magic/Magdir/sniffer vendor/file/dist/magic/Magdir/sql vendor/file/dist/magic/Magdir/sun vendor/file/dist/magic/Magdir/sysex vendor/file/dist/magic/Magdir/tcl vendor/file/dist/magic/Magdir/terminfo vendor/file/dist/magic/Magdir/tex vendor/file/dist/magic/Magdir/tplink vendor/file/dist/magic/Magdir/unicode vendor/file/dist/magic/Magdir/varied.script vendor/file/dist/magic/Magdir/virtual vendor/file/dist/magic/Magdir/warc vendor/file/dist/magic/Magdir/webassembly vendor/file/dist/magic/Magdir/windows vendor/file/dist/magic/Magdir/wordprocessors vendor/file/dist/magic/Magdir/wsdl vendor/file/dist/magic/Magdir/xwindows vendor/file/dist/magic/Magdir/yara vendor/file/dist/magic/Magdir/zip vendor/file/dist/magic/Makefile.am vendor/file/dist/magic/Makefile.in vendor/file/dist/src/Makefile.am vendor/file/dist/src/Makefile.in vendor/file/dist/src/apprentice.c vendor/file/dist/src/apptype.c vendor/file/dist/src/ascmagic.c vendor/file/dist/src/asprintf.c vendor/file/dist/src/buffer.c vendor/file/dist/src/cdf.c vendor/file/dist/src/cdf.h vendor/file/dist/src/cdf_time.c vendor/file/dist/src/compress.c vendor/file/dist/src/der.c vendor/file/dist/src/dprintf.c vendor/file/dist/src/elfclass.h vendor/file/dist/src/encoding.c vendor/file/dist/src/file.c vendor/file/dist/src/file.h vendor/file/dist/src/fmtcheck.c vendor/file/dist/src/fsmagic.c vendor/file/dist/src/funcs.c vendor/file/dist/src/getopt_long.c vendor/file/dist/src/is_tar.c vendor/file/dist/src/magic.c vendor/file/dist/src/magic.h.in vendor/file/dist/src/mygetopt.h vendor/file/dist/src/print.c vendor/file/dist/src/readcdf.c vendor/file/dist/src/readelf.c vendor/file/dist/src/readelf.h vendor/file/dist/src/seccomp.c vendor/file/dist/src/softmagic.c vendor/file/dist/src/vasprintf.c vendor/file/dist/tests/Makefile.am vendor/file/dist/tests/Makefile.in Modified: vendor/file/dist/AUTHORS ============================================================================== --- vendor/file/dist/AUTHORS Sun Nov 10 03:37:45 2019 (r354581) +++ vendor/file/dist/AUTHORS Sun Nov 10 03:44:32 2019 (r354582) @@ -1 +1 @@ -See COPYING. \ No newline at end of file +See COPYING. Modified: vendor/file/dist/COPYING ============================================================================== --- vendor/file/dist/COPYING Sun Nov 10 03:37:45 2019 (r354581) +++ vendor/file/dist/COPYING Sun Nov 10 03:44:32 2019 (r354582) @@ -1,4 +1,4 @@ -$File: COPYING,v 1.1 2008/02/05 19:08:11 christos Exp $ +$File: COPYING,v 1.2 2018/09/09 20:33:28 christos Exp $ Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995. Software written by Ian F. Darwin and others; maintained 1994- Christos Zoulas. @@ -15,7 +15,7 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE Modified: vendor/file/dist/ChangeLog ============================================================================== --- vendor/file/dist/ChangeLog Sun Nov 10 03:37:45 2019 (r354581) +++ vendor/file/dist/ChangeLog Sun Nov 10 03:44:32 2019 (r354582) @@ -1,3 +1,75 @@ +2019-05-14 22:26 Christos Zoulas + + * release 5.37 + +2019-05-09 22:27 Christos Zoulas + + * Make sure that continuation separators are printed + with -k within softmagic + +2019-05-06 22:27 Christos Zoulas + + * Change SIGPIPE saving and restoring during compression to use + sigaction(2) instead of signal(3) and cache it. (Denys Vlasenko) + * Cache stat(2) calls more to reduce number of calls (Denys Vlasenko) + +2019-05-06 17:25 Christos Zoulas + + * PR/77: Handle --mime-type and -k correctly. + +2019-05-03 15:26 Christos Zoulas + + * Switch decompression code to use vfork() because + tools like rpmdiff and rpmbuild call libmagic + with large process footprints (Denys Vlasenko) + +2019-04-07 14:05 Christos Zoulas + + * PR/75: --enable-zlib, did not work. + +2019-02-27 11:54 Christos Zoulas + + * Improve regex efficiency (Michael Schroeder) by: + 1. Prefixing regex searches with regular search + for keywords where possible + 2. Using memmem(3) where available + +2019-02-20 10:16 Christos Zoulas + + * release 5.36 + +2019-02-19 15:30 Christos Zoulas + + * Fix cast to use cast macros + * Add UCS-32 builtin detection (PR/61) reported by tmc + +2019-02-18 18:24 Christos Zoulas + + * Fix stack read (PR/62) and write (PR/64) stack overflows + reported by spinpx + +2018-10-18 19:32 Christos Zoulas + + * release 5.35 + +2018-09-10 20:38 Christos Zoulas + + * Add FreeBSD ELF core file support (John Baldwin) + +2018-08-20 18:40 Christos Zoulas + + * PR/30: Allow all parameter values to be set (don't treat 0 specially) + * handle default annotations on the softmagic match instead at the + end. + +2018-07-25 10:17 Christos Zoulas + + * PR/23: Recognize JSON files + +2018-07-25 10:17 Christos Zoulas + + * PR/18: file --mime-encoding should not print mime-type + 2018-07-25 8:50 Christos Zoulas * release 5.34 @@ -14,11 +86,11 @@ * release 5.33 -2018-02-24 14:50 Christos Zoulas +2018-02-24 14:50 Christos Zoulas * extend the support for ${x?:} expansions for magic descriptions -2018-02-21 16:25 Christos Zoulas +2018-02-21 16:25 Christos Zoulas * add support for ${x?:} in mime types to handle pie binaries. @@ -90,7 +162,7 @@ * Add missing overflow check in der magic (Jonas Wagner) 2016-10-25 10:40 Christos Zoulas - + * release 5.29 2016-10-24 11:20 Christos Zoulas @@ -131,11 +203,11 @@ - set offset to 0 on failure. 2016-05-13 12:00 Christos Zoulas - + * release 5.27 2016-04-18 9:35 Christos Zoulas - + * Errors comparing DER entries or computing offsets are just indications of malformed non-DER files. Don't print them. @@ -144,7 +216,7 @@ * Put new bytes constant in the right file (not the generated one) 2016-04-16 18:34 Christos Zoulas - + * release 5.26 2016-03-31 13:50 Christos Zoulas @@ -190,7 +262,7 @@ * PR/492: compression forking was broken with magic_buffer. 2015-09-16 9:50 Christos Zoulas - + * release 5.25 2015-09-11 13:25 Christos Zoulas @@ -218,7 +290,7 @@ * release 5.23 2015-06-09 16:10 Christos Zoulas - + * Fix issue with regex range for magic with offset * Always return true from mget with USE (success to mget not match indication). Fixes mime evaluation after USE magic @@ -271,12 +343,12 @@ * add indirect relative for TIFF/Exif 2014-12-16 18:10 Christos Zoulas - + * restructure elf note printing to avoid repeated messages * add note limit, suggested by Alexander Cherepanov 2014-12-16 16:53 Christos Zoulas - + * Bail out on partial pread()'s (Alexander Cherepanov) * Fix incorrect bounds check in file_printable (Alexander Cherepanov) @@ -287,7 +359,7 @@ more places for safety * in ELF, instead of "(uses dynamic libraries)" when PT_INTERP is present print the interpreter name. - + 2014-12-10 20:01 Christos Zoulas * release 5.21 @@ -330,7 +402,7 @@ on a byte by byte basis, so that we don't get issues with locale's trying to interpret random byte streams as UTF-8 and having printf error out with EILSEQ. - + 2014-10-17 11:48 Christos Zoulas * fix bounds in note reading (Francisco Alonso / Red Hat) @@ -361,7 +433,7 @@ * release 5.19 2014-06-09 9:04 Christos Zoulas - + * Misc buffer overruns and missing buffer size tests in cdf parsing (Francisco Alonso, Jan Kaluza) @@ -391,7 +463,7 @@ 2014-05-04 14:55 Christos Zoulas - * PR/351: Fix compilation of empty files + * PR/351: Fix compilation of empty files 2014-04-30 17:39 Christos Zoulas @@ -495,7 +567,7 @@ * Don't treat magic as an error if offset was past EOF (Christoph Biedl) 2013-05-28 17:25 Christos Zoulas - + * Fix spacing issues in softmagic and elf (Jan Kaluza) 2013-05-02 18:00 Christos Zoulas @@ -551,7 +623,7 @@ * Make getline public so that file can link against it. Perhaps it is better to rename it, or hide it differently. Fixes builds on platforms that do not provide it. - + 2013-01-07 16:30 Christos Zoulas * Add SuS d{,1,2,4,8}, u{,1,2,4,8} and document @@ -901,7 +973,7 @@ (Cheng Renquan) 2009-05-08 13:40 Christos Zoulas - + * lint fixes and more from NetBSD 2009-05-06 10:25 Christos Zoulas @@ -921,7 +993,7 @@ 2009-03-27 18:43 Christos Zoulas - * don't print \012- separators in the same magic entry + * don't print \012- separators in the same magic entry if it consists of multiple magic printing lines. 2009-03-23 10:20 Christos Zoulas Modified: vendor/file/dist/NEWS ============================================================================== --- vendor/file/dist/NEWS Sun Nov 10 03:37:45 2019 (r354581) +++ vendor/file/dist/NEWS Sun Nov 10 03:44:32 2019 (r354582) @@ -1 +1 @@ -See ChangeLog. \ No newline at end of file +See ChangeLog. Modified: vendor/file/dist/README ============================================================================== --- vendor/file/dist/README Sun Nov 10 03:37:45 2019 (r354581) +++ vendor/file/dist/README Sun Nov 10 03:44:32 2019 (r354582) @@ -1,6 +1,6 @@ -## README for file(1) Command ## +## README for file(1) Command and the libmagic(3) library ## - @(#) $File: README,v 1.54 2018/05/30 03:06:56 christos Exp $ + @(#) $File: README,v 1.57 2019/02/06 00:20:56 christos Exp $ Mailing List: file@astron.com Mailing List archives: http://mailman.astron.com/pipermail/file/ @@ -63,53 +63,54 @@ magic numbers assigned to all sorts of data files that are in reasonable circulation. Send your magic numbers, in magic(5) format please, to the maintainer, Christos Zoulas. -COPYING - read this first. -README - read this second (you are currently reading this file). +COPYING - read this first. +README - read this second (you are currently reading this file). INSTALL - read on how to install -src/apprentice.c - parses /etc/magic to learn magic -src/apptype.c - used for OS/2 specific application type magic -src/ascmagic.c - third & last set of tests, based on hardwired assumptions. -src/asctime_r.c - replacement for OS's that don't have it. -src/asprintf.c - replacement for OS's that don't have it. -src/asctime_r.c - replacement for OS's that don't have it. -src/asprintf.c - replacement for OS's that don't have it. +src/apprentice.c - parses /etc/magic to learn magic +src/apptype.c - used for OS/2 specific application type magic +src/ascmagic.c - third & last set of tests, based on hardwired assumptions. +src/asctime_r.c - replacement for OS's that don't have it. +src/asprintf.c - replacement for OS's that don't have it. +src/asctime_r.c - replacement for OS's that don't have it. +src/asprintf.c - replacement for OS's that don't have it. src/buffer.c - buffer handling functions. -src/cdf.[ch] - parser for Microsoft Compound Document Files -src/cdf_time.c - time converter for CDF. -src/compress.c - handles decompressing files to look inside. -src/ctime_r.c - replacement for OS's that don't have it. +src/cdf.[ch] - parser for Microsoft Compound Document Files +src/cdf_time.c - time converter for CDF. +src/compress.c - handles decompressing files to look inside. +src/ctime_r.c - replacement for OS's that don't have it. src/der.[ch] - parser for Distinguished Encoding Rules src/dprintf.c - replacement for OS's that don't have it. src/elfclass.h - common code for elf 32/64. -src/encoding.c - handles unicode encodings -src/file.c - the main program -src/file.h - header file +src/encoding.c - handles unicode encodings +src/file.c - the main program +src/file.h - header file src/file_opts.h - list of options -src/fmtcheck.c - replacement for OS's that don't have it. -src/fsmagic.c - first set of tests the program runs, based on filesystem info -src/funcs.c - utilility functions -src/getline.c - replacement for OS's that don't have it. -src/getopt_long.c - replacement for OS's that don't have it. -src/gmtime_r.c - replacement for OS's that don't have it. -src/is_tar.c, tar.h - knows about Tape ARchive format (courtesy John Gilmore). -src/localtime_r.c - replacement for OS's that don't have it. +src/fmtcheck.c - replacement for OS's that don't have it. +src/fsmagic.c - first set of tests the program runs, based on filesystem info +src/funcs.c - utilility functions +src/getline.c - replacement for OS's that don't have it. +src/getopt_long.c - replacement for OS's that don't have it. +src/gmtime_r.c - replacement for OS's that don't have it. +src/is_json.c - knows about JavaScript Object Notation format (RFC 8259). +src/is_tar.c, tar.h - knows about Tape ARchive format (courtesy John Gilmore). +src/localtime_r.c - replacement for OS's that don't have it. src/magic.h.in - source file for magic.h -src/mygetopt.h - replacement for OS's that don't have it. -src/magic.c - the libmagic api -src/names.h - header file for ascmagic.c -src/pread.c - replacement for OS's that don't have it. -src/print.c - print results, errors, warnings. -src/readcdf.c - CDF wrapper. -src/readelf.[ch] - Stand-alone elf parsing code. -src/softmagic.c - 2nd set of tests, based on /etc/magic -src/mygetopt.h - replacement for OS's that don't have it. -src/strcasestr.c - replacement for OS's that don't have it. -src/strlcat.c - replacement for OS's that don't have it. -src/strlcpy.c - replacement for OS's that don't have it. -src/strndup.c - replacement for OS's that don't have it. +src/mygetopt.h - replacement for OS's that don't have it. +src/magic.c - the libmagic api +src/names.h - header file for ascmagic.c +src/pread.c - replacement for OS's that don't have it. +src/print.c - print results, errors, warnings. +src/readcdf.c - CDF wrapper. +src/readelf.[ch] - Stand-alone elf parsing code. +src/softmagic.c - 2nd set of tests, based on /etc/magic +src/mygetopt.h - replacement for OS's that don't have it. +src/strcasestr.c - replacement for OS's that don't have it. +src/strlcat.c - replacement for OS's that don't have it. +src/strlcpy.c - replacement for OS's that don't have it. +src/strndup.c - replacement for OS's that don't have it. src/tar.h - tar file definitions -src/vasprintf.c - for systems that don't have it. -doc/file.man - man page for the command +src/vasprintf.c - for systems that don't have it. +doc/file.man - man page for the command doc/magic.man - man page for the magic file, courtesy Guy Harris. Install as magic.4 on USG and magic.5 on V7 or Berkeley; cf Makefile. Modified: vendor/file/dist/config.h.in ============================================================================== --- vendor/file/dist/config.h.in Sun Nov 10 03:37:45 2019 (r354581) +++ vendor/file/dist/config.h.in Sun Nov 10 03:44:32 2019 (r354582) @@ -83,12 +83,6 @@ /* Define to 1 if you have the `z' library (-lz). */ #undef HAVE_LIBZ -/* Define to 1 if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LOCALE_H - /* Define to 1 if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R @@ -98,6 +92,9 @@ /* Define to 1 if declares mbstate_t. */ #undef HAVE_MBSTATE_T +/* Define to 1 if you have the `memmem' function. */ +#undef HAVE_MEMMEM + /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H @@ -116,18 +113,9 @@ /* Define to 1 if you have the `pread' function. */ #undef HAVE_PREAD -/* Define to 1 if you have the `setlocale' function. */ -#undef HAVE_SETLOCALE - -/* Define to 1 if you have the header file. */ -#undef HAVE_SIGNAL_H - /* Have sig_t type */ #undef HAVE_SIG_T -/* Define to 1 if you have the header file. */ -#undef HAVE_STDDEF_H - /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H @@ -137,9 +125,6 @@ /* Define to 1 if you have the `strcasestr' function. */ #undef HAVE_STRCASESTR -/* Define to 1 if you have the `strerror' function. */ -#undef HAVE_STRERROR - /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H @@ -158,9 +143,6 @@ /* Define to 1 if you have the `strtof' function. */ #undef HAVE_STRTOF -/* Define to 1 if you have the `strtoul' function. */ -#undef HAVE_STRTOUL - /* HAVE_STRUCT_OPTION */ #undef HAVE_STRUCT_OPTION @@ -181,6 +163,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SYSMACROS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H Modified: vendor/file/dist/configure ============================================================================== --- vendor/file/dist/configure Sun Nov 10 03:37:45 2019 (r354581) +++ vendor/file/dist/configure Sun Nov 10 03:44:32 2019 (r354582) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for file 5.34. +# Generated by GNU Autoconf 2.69 for file 5.37. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='file' PACKAGE_TARNAME='file' -PACKAGE_VERSION='5.34' -PACKAGE_STRING='file 5.34' +PACKAGE_VERSION='5.37' +PACKAGE_STRING='file 5.37' PACKAGE_BUGREPORT='christos@astron.com' PACKAGE_URL='' @@ -1329,7 +1329,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures file 5.34 to adapt to many kinds of systems. +\`configure' configures file 5.37 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1399,7 +1399,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of file 5.34:";; + short | recursive ) echo "Configuration of file 5.37:";; esac cat <<\_ACEOF @@ -1511,7 +1511,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -file configure 5.34 +file configure 5.37 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2167,7 +2167,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by file $as_me 5.34, which was +It was created by file $as_me 5.37, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3033,7 +3033,7 @@ fi # Define the identity of the package. PACKAGE='file' - VERSION='5.34' + VERSION='5.37' cat >>confdefs.h <<_ACEOF @@ -12784,7 +12784,7 @@ $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi -for ac_header in stdint.h fcntl.h locale.h stdint.h inttypes.h unistd.h +for ac_header in stdint.h fcntl.h inttypes.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -12797,7 +12797,7 @@ fi done -for ac_header in stddef.h utime.h wchar.h wctype.h limits.h +for ac_header in utime.h wchar.h wctype.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -12810,7 +12810,7 @@ fi done -for ac_header in getopt.h err.h xlocale.h signal.h +for ac_header in getopt.h err.h xlocale.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -12823,7 +12823,7 @@ fi done -for ac_header in sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h +for ac_header in sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h sys/sysmacros.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -12850,10 +12850,7 @@ fi done fi -ac_fn_c_check_type "$LINENO" "sig_t" "ac_cv_type_sig_t" " -#ifdef HAVE_SIGNAL_H -#include -#endif +ac_fn_c_check_type "$LINENO" "sig_t" "ac_cv_type_sig_t" "#include " if test "x$ac_cv_type_sig_t" = xyes; then : @@ -12976,7 +12973,8 @@ _ACEOF fi -ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "$ac_includes_default" +ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include +" if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then : cat >>confdefs.h <<_ACEOF @@ -14229,7 +14227,7 @@ fi fi -for ac_func in strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale setlocale +for ac_func in strndup mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale memmem do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -14583,7 +14581,8 @@ if test "$enable_zlib" = "yes"; then if test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" != "yesyes"; then as_fn_error $? "zlib support requested but not found" "$LINENO" 5 fi -elif test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" = "yesyes"; then +fi +if test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" = "yesyes"; then $as_echo "#define ZLIBSUPPORT 1" >>confdefs.h @@ -15134,7 +15133,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by file $as_me 5.34, which was +This file was extended by file $as_me 5.37, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15200,7 +15199,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -file config.status 5.34 +file config.status 5.37 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: vendor/file/dist/configure.ac ============================================================================== --- vendor/file/dist/configure.ac Sun Nov 10 03:37:45 2019 (r354581) +++ vendor/file/dist/configure.ac Sun Nov 10 03:44:32 2019 (r354582) @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([file],[5.34],[christos@astron.com]) +AC_INIT([file],[5.37],[christos@astron.com]) AM_INIT_AUTOMAKE([subdir-objects foreign]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) @@ -35,12 +35,12 @@ fi], [ ]) AC_MSG_CHECKING(for zlib support) -AC_ARG_ENABLE(zlib, +AC_ARG_ENABLE([zlib], [AS_HELP_STRING([--disable-zlib], [disable zlib compression support @<:@default=auto@:>@])]) AC_MSG_RESULT($enable_zlib) AC_MSG_CHECKING(for libseccomp support) -AC_ARG_ENABLE(libseccomp, +AC_ARG_ENABLE([libseccomp], [AS_HELP_STRING([--disable-libseccomp], [disable libseccomp sandboxing @<:@default=auto@:>@])]) AC_MSG_RESULT($enable_libseccomp) @@ -90,17 +90,14 @@ dnl Checks for headers AC_HEADER_STDC AC_HEADER_MAJOR AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(stdint.h fcntl.h locale.h stdint.h inttypes.h unistd.h) -AC_CHECK_HEADERS(stddef.h utime.h wchar.h wctype.h limits.h) -AC_CHECK_HEADERS(getopt.h err.h xlocale.h signal.h) -AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h) +AC_CHECK_HEADERS(stdint.h fcntl.h inttypes.h unistd.h) +AC_CHECK_HEADERS(utime.h wchar.h wctype.h) +AC_CHECK_HEADERS(getopt.h err.h xlocale.h) +AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h sys/sysmacros.h) if test "$enable_zlib" != "no"; then AC_CHECK_HEADERS(zlib.h) fi -AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_SIG_T],1,[Have sig_t type])],,[ -#ifdef HAVE_SIGNAL_H -#include -#endif]) +AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_SIG_T],1,[Have sig_t type])],,[#include ]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -108,7 +105,7 @@ AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_CHECK_MEMBERS([struct stat.st_rdev]) -AC_CHECK_MEMBERS([struct tm.tm_gmtoff]) +AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[#include ]) AC_STRUCT_TIMEZONE AC_STRUCT_TIMEZONE_DAYLIGHT AC_SYS_LARGEFILE @@ -154,7 +151,7 @@ else fi]) dnl Checks for functions -AC_CHECK_FUNCS(strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale setlocale) +AC_CHECK_FUNCS(strndup mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale memmem) dnl Provide implementation of some required functions if necessary AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline ctime_r asctime_r localtime_r gmtime_r pread strcasestr fmtcheck dprintf) @@ -178,7 +175,8 @@ if test "$enable_zlib" = "yes"; then if test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" != "yesyes"; then AC_MSG_ERROR([zlib support requested but not found]) fi -elif test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" = "yesyes"; then +fi +if test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" = "yesyes"; then AC_DEFINE([ZLIBSUPPORT], 1, [Enable zlib compression support]) fi Modified: vendor/file/dist/doc/file.man ============================================================================== --- vendor/file/dist/doc/file.man Sun Nov 10 03:37:45 2019 (r354581) +++ vendor/file/dist/doc/file.man Sun Nov 10 03:44:32 2019 (r354582) @@ -1,5 +1,5 @@ -.\" $File: file.man,v 1.131 2018/07/24 21:33:56 christos Exp $ -.Dd July 25, 2018 +.\" $File: file.man,v 1.135 2019/03/03 02:32:40 christos Exp $ +.Dd February 18, 2019 .Dt FILE __CSECTION__ .Os .Sh NAME @@ -159,7 +159,7 @@ two groups, so they are performed last. The language test routines also test for some miscellany (such as .Xr tar 1 -archives). +archives, JSON files). .Pp Any file that cannot be identified as having been written in any of the character sets listed above is simply said to be @@ -171,6 +171,8 @@ Causes the file command to output the file type and cr used by older MacOS versions. The code consists of eight letters, 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 @@ -213,6 +215,8 @@ Checks for, and looks inside, compressed files. .It elf Prints ELF file details, provided soft magic tests are enabled and the elf magic is found. +.It json +Examines JSON (RFC-7159) files by parsing them for compliance. .It soft Consults magic files. .It tar @@ -628,11 +632,11 @@ were written by John Gilmore from his public-domain program, and are not covered by the above license. .Sh BUGS Please report bugs and send patches to the bug tracker at -.Pa http://bugs.astron.com/ +.Pa https://bugs.astron.com/ or the mailing list at .Aq file@astron.com (visit -.Pa http://mailman.astron.com/mailman/listinfo/file +.Pa https://mailman.astron.com/mailman/listinfo/file first to subscribe). .Sh TODO Fix output so that tests for MIME and APPLE flags are not needed all Modified: vendor/file/dist/doc/libmagic.man ============================================================================== --- vendor/file/dist/doc/libmagic.man Sun Nov 10 03:37:45 2019 (r354581) +++ vendor/file/dist/doc/libmagic.man Sun Nov 10 03:44:32 2019 (r354582) @@ -1,6 +1,6 @@ -.\" $File: libmagic.man,v 1.41 2017/05/23 21:54:07 christos Exp $ +.\" $File: libmagic.man,v 1.44 2018/09/09 20:33:28 christos Exp $ .\" -.\" Copyright (c) Christos Zoulas 2003. +.\" Copyright (c) Christos Zoulas 2003, 2018. .\" All Rights Reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 23, 2017 +.Dd August 18, 2018 .Dt LIBMAGIC 3 .Os .Sh NAME @@ -159,6 +159,8 @@ Don't examine tar files. Don't check for various types of text files. .It Dv MAGIC_NO_CHECK_TOKENS Don't look for known tokens inside ascii files. +.It Dv MAGIC_NO_CHECK_JSON +Don't example JSON files. .El .Pp The @@ -391,6 +393,19 @@ The compiled default magic database. .Sh SEE ALSO .Xr file __CSECTION__ , .Xr magic __FSECTION__ +.Sh BUGS +The results from +.Fn magic_buffer +and +.Fn magic_file +where the buffer and the file contain the same data +can produce different results, because in the +.Fn magic_file +case, the program can +.Xr lseek 2 +and +.Xr stat 2 +the file descriptor. .Sh AUTHORS .An M\(oans Rullg\(oard Initial libmagic implementation, and configuration. Modified: vendor/file/dist/doc/magic.man ============================================================================== --- vendor/file/dist/doc/magic.man Sun Nov 10 03:37:45 2019 (r354581) +++ vendor/file/dist/doc/magic.man Sun Nov 10 03:44:32 2019 (r354582) @@ -1,6 +1,5 @@ -.It S2 -.\" $File: magic.man,v 1.93 2018/06/22 20:39:49 christos Exp $ -.Dd June 22, 2018 +.\" $File: magic.man,v 1.96 2019/01/21 14:56:53 christos Exp $ +.Dd January 21, 2019 .Dt MAGIC __FSECTION__ .Os .\" install as magic.4 on USG, magic.5 on V7, Berkeley and Linux systems. @@ -117,13 +116,13 @@ The following modifiers are supported: .It B A byte length (default). .It H -A 4 byte big endian length. -.It h A 2 byte big endian length. +.It h +A 2 byte little endian length. .It L -A 4 byte little endian length. +A 4 byte big endian length. .It l -A 2 byte little endian length. +A 4 byte little endian length. .It J The length includes itself in its count. .El Modified: vendor/file/dist/magic/Header ============================================================================== --- vendor/file/dist/magic/Header Sun Nov 10 03:37:45 2019 (r354581) +++ vendor/file/dist/magic/Header Sun Nov 10 03:44:32 2019 (r354582) @@ -2,4 +2,4 @@ # Format is described in magic(files), where: # files is 5 on V7 and BSD, 4 on SV, and ?? on SVID. # Don't edit this file, edit /etc/magic or send your magic improvements -# to the maintainers, at file@mx.gw.com +# to the maintainers, at file@astron.com Modified: vendor/file/dist/magic/Magdir/acorn ============================================================================== --- vendor/file/dist/magic/Magdir/acorn Sun Nov 10 03:37:45 2019 (r354581) +++ vendor/file/dist/magic/Magdir/acorn Sun Nov 10 03:44:32 2019 (r354582) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: acorn,v 1.6 2017/10/19 16:40:37 christos Exp $ +# $File: acorn,v 1.7 2019/04/19 00:42:27 christos Exp $ # acorn: file(1) magic for files found on Acorn systems # @@ -83,7 +83,7 @@ # compression mode y (0 - 4) for GIF LZW with a maximum n bits # (y~n,0~12,1~13,2~14,3~15,4~16) >>>5 ulelong+12 x \b, LZW %u-bits compression -# http://www.filebase.org.uk/filetypes +# https://www.filebase.org.uk/filetypes # !Packdir compressed archive has three hexadecimal digits code 68E !:mime application/x-acorn-68E !:ext pkd/bin Modified: vendor/file/dist/magic/Magdir/adventure ============================================================================== --- vendor/file/dist/magic/Magdir/adventure Sun Nov 10 03:37:45 2019 (r354581) +++ vendor/file/dist/magic/Magdir/adventure Sun Nov 10 03:44:32 2019 (r354582) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: adventure,v 1.17 2017/07/03 16:03:40 christos Exp $ +# $File: adventure,v 1.18 2019/04/19 00:42:27 christos Exp $ # adventure: file(1) magic for Adventure game files # # from Allen Garvin @@ -21,8 +21,8 @@ # Updated by Adam Buchbinder # #http://www.gnelson.demon.co.uk/zspec/sect11.html -#http://www.jczorkmid.net/~jpenney/ZSpec11-latest.txt -#http://en.wikipedia.org/wiki/Z-machine +#https://www.jczorkmid.net/~jpenney/ZSpec11-latest.txt +#https://en.wikipedia.org/wiki/Z-machine # The first byte is the Z-machine revision; it is always between 1 and 8. We # had false matches (for instance, inbig5.ocp from the Omega TeX extension as # well as an occasional MP3 file), so we sanity-check the version number. @@ -111,7 +111,7 @@ # Danny Milosavljevic # These are ADRIFT (adventure game standard) game files, extension .taf # Checked from source at (http://www.adrift.co/) and various taf files -# found at the Interactive Fiction Archive (http://ifarchive.org/) +# found at the Interactive Fiction Archive (https://ifarchive.org/) 0 belong 0x3C423FC9 >4 belong 0x6A87C2CF Adrift game file version >>8 belong 0x94453661 3.80 Modified: vendor/file/dist/magic/Magdir/algol68 ============================================================================== --- vendor/file/dist/magic/Magdir/algol68 Sun Nov 10 03:37:45 2019 (r354581) +++ vendor/file/dist/magic/Magdir/algol68 Sun Nov 10 03:44:32 2019 (r354582) @@ -1,17 +1,17 @@ #------------------------------------------------------------------------------ -# $File: algol68,v 1.2 2016/10/17 14:17:48 christos Exp $ +# $File: algol68,v 1.3 2018/10/19 01:04:21 christos Exp $ # algol68: file(1) magic for Algol 68 source # 0 search/8192 (input, Algol 68 source text !:mime text/x-Algol68 -0 regex \^PROC Algol 68 source text +0 regex/1024 \^PROC Algol 68 source text !:mime text/x-Algol68 -0 regex MODE[\t\ ] Algol 68 source text +0 regex/1024 \bMODE[\t\ ] Algol 68 source text !:mime text/x-Algol68 -0 regex REF[\t\ ] Algol 68 source text +0 regex/1024 \bREF[\t\ ] Algol 68 source text !:mime text/x-Algol68 -0 regex FLEX[\t\ ]\*\\[ Algol 68 source text +0 regex/1024 \bFLEX[\t\ ]\*\\[ Algol 68 source text !:mime text/x-Algol68 #0 regex [\t\ ]OD Algol 68 source text #!:mime text/x-Algol68 Modified: vendor/file/dist/magic/Magdir/amigaos ============================================================================== --- vendor/file/dist/magic/Magdir/amigaos Sun Nov 10 03:37:45 2019 (r354581) +++ vendor/file/dist/magic/Magdir/amigaos Sun Nov 10 03:44:32 2019 (r354582) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: amigaos,v 1.16 2017/03/17 21:35:28 christos Exp $ +# $File: amigaos,v 1.17 2018/10/16 18:57:19 christos Exp $ # amigaos: file(1) magic for AmigaOS binary formats: # @@ -66,3 +66,22 @@ # From: Przemek Kramarczyk 0 string .KEY AmigaDOS script 0 string .key AmigaDOS script + +# AMOS Basic file formats +# https://www.exotica.org.uk/wiki/AMOS_file_formats +0 string AMOS\040Basic\040 AMOS Basic source code +>11 byte =0x56 \b, tested +>11 byte =0x76 \b, untested +0 string AMOS\040Pro AMOS Basic source code +>11 byte =0x56 \b, tested +>11 byte =0x76 \b, untested +0 string AmSp AMOS Basic sprite bank +>4 beshort x \b, %d sprites +0 string AmIc AMOS Basic icon bank +>4 beshort x \b, %d icons +0 string AmBk AMOS Basic memory bank +>4 beshort x \b, bank number %d +>8 belong&0xFFFFFFF x \b, length %d +>12 regex .{8} \b, type %s +0 string AmBs AMOS Basic memory banks +>4 beshort x \b, %d banks Modified: vendor/file/dist/magic/Magdir/android ============================================================================== --- vendor/file/dist/magic/Magdir/android Sun Nov 10 03:37:45 2019 (r354581) +++ vendor/file/dist/magic/Magdir/android Sun Nov 10 03:44:32 2019 (r354582) @@ -1,6 +1,6 @@ #------------------------------------------------------------ -# $File: android,v 1.10 2017/03/17 21:35:28 christos Exp $ +# $File: android,v 1.12 2019/04/19 00:42:27 christos Exp $ # Various android related magic entries #------------------------------------------------------------ @@ -32,33 +32,68 @@ # Android Backup archive # From: Ariel Shkedi -# File extension: .ab -# No mime-type defined +# Update: Joerg Jenderek # URL: https://github.com/android/platform_frameworks_base/blob/\ # 0bacfd2ba68d21a68a3df345b830bc2a1e515b5a/services/java/com/\ # android/server/BackupManagerService.java#L2367 +# Reference: https://sourceforge.net/projects/adbextractor/ +# android-backup-extractor/perl/backupencrypt.pl +# Note: only unix line feeds "\n" found # After the header comes a tar file # If compressed, the entire tar file is compressed with JAVA deflate # # Include the version number hardcoded with the magic string to avoid # false positives -0 string/b ANDROID\ BACKUP\n1\n Android Backup +0 string/b ANDROID\ BACKUP\n Android Backup +# maybe look for some more characteristics like linefeed '\n' or version +#>16 string \n +# No mime-type defined offically +!:mime application/x-google-ab +!:ext ab +# on 2nd line version (often 1, 2 on kitkat 4.4.3+, 4 on 7.1.2) +>15 string >\0 \b, version %s +# "1" on 3rd line means compressed >17 string 0\n \b, Not-Compressed >17 string 1\n \b, Compressed +# The 4th line is encryption "none" or "AES-256" # any string as long as it's not the word none (which is matched below) +>19 string none\n \b, Not-Encrypted +# look for backup content after line with encryption info +#>>19 search/7 \n +# data part after header for not encrypted Android Backup +#>>>&0 ubequad x \b, content 0x%16.16llx... +# look for zlib compressed by ./compress after message with 1 space at end +#>>>&0 indirect x \b; contains +# look for tar archive block by ./archive for package name manifest +>>288 string ustar \b; contains +>>>31 use tar-file +# look for zip/jar archive by ./archive ./zip after message with 1 space at end +#>>2079 search/1025/s PK\003\004 \b; contains +#>>>&0 indirect x +>19 string !none >>19 regex/1l \^([^n\n]|n[^o]|no[^n]|non[^e]|none.+).* \b, Encrypted (%s) ->>19 string none\n \b, Not-Encrypted # Commented out because they don't seem useful to print # (but they are part of the header - the tar file comes after them): +# The 5th line is User Password Salt (128 Hex) +# string length too high with standard src configuration +#>>>&1 string >\0 \b, PASSWORD salt: "%-128.128s" #>>>&1 regex/1l .* \b, Password salt: %s +# The 6th line is Master Key Checksum Salt (128 Hex) #>>>>&1 regex/1l .* \b, Master salt: %s +# The 7th line is Number of PBDKF2 Rounds (10000) #>>>>>&1 regex/1l .* \b, PBKDF2 rounds: %s +# The 8th line is User key Initialization Vector (IV) (32 Hex) #>>>>>>&1 regex/1l .* \b, IV: %s +#>>>>>>&1 regex/1l .* \b, IV: %s +# The 9th line is Master IV+Key+Checksum (192 Hex) #>>>>>>>&1 regex/1l .* \b, Key: %s +# look for new line separator char after line number 9 +#>>>0x204 ubyte 0x0a NL found +#>>>>&1 ubequad x \b, Content magic %16.16llx # *.pit files by Joerg Jenderek -# http://forum.xda-developers.com/showthread.php?p=9122369 -# http://forum.xda-developers.com/showthread.php?t=816449 +# https://forum.xda-developers.com/showthread.php?p=9122369 +# https://forum.xda-developers.com/showthread.php?t=816449 # Partition Information Table for Samsung's smartphone with Android *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sun Nov 10 03:45:17 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 610141A8DE8; Sun, 10 Nov 2019 03:45:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 479fzK1tPZz4W9H; Sun, 10 Nov 2019 03:45:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0A78D211A3; Sun, 10 Nov 2019 03:45:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAA3jGdO060355; Sun, 10 Nov 2019 03:45:16 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAA3jGEQ060354; Sun, 10 Nov 2019 03:45:16 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201911100345.xAA3jGEQ060354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 10 Nov 2019 03:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r354583 - vendor/file/5.37 X-SVN-Group: vendor X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: vendor/file/5.37 X-SVN-Commit-Revision: 354583 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Nov 2019 03:45:17 -0000 Author: delphij Date: Sun Nov 10 03:45:16 2019 New Revision: 354583 URL: https://svnweb.freebsd.org/changeset/base/354583 Log: Tag file 5.37. Added: vendor/file/5.37/ - copied from r354582, vendor/file/dist/