From owner-svn-src-all@freebsd.org Sun Nov 10 17:00:27 2019 Return-Path: Delivered-To: svn-src-all@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 DDB8F1B8C4A; Sun, 10 Nov 2019 17:00:27 +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 47B0cq6FZBz48x7; Sun, 10 Nov 2019 17:00:27 +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 A140B1F04; Sun, 10 Nov 2019 17:00:27 +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 xAAH0R2l027486; Sun, 10 Nov 2019 17:00:27 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAAH0OqB027468; Sun, 10 Nov 2019 17:00:24 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201911101700.xAAH0OqB027468@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 17:00:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354595 - in head: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/src contrib/file/tests lib/libmagic X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in head: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/src contrib/file/tests lib/libmagic X-SVN-Commit-Revision: 354595 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Nov 2019 17:00:27 -0000 Author: delphij Date: Sun Nov 10 17:00:23 2019 New Revision: 354595 URL: https://svnweb.freebsd.org/changeset/base/354595 Log: MFV r354582: file 5.37. MFC after: 3 days Added: head/contrib/file/magic/Magdir/biosig - copied unchanged from r354582, vendor/file/dist/magic/Magdir/biosig head/contrib/file/magic/Magdir/clojure - copied unchanged from r354582, vendor/file/dist/magic/Magdir/clojure head/contrib/file/magic/Magdir/edid - copied unchanged from r354582, vendor/file/dist/magic/Magdir/edid head/contrib/file/magic/Magdir/espressif - copied unchanged from r354582, vendor/file/dist/magic/Magdir/espressif head/contrib/file/magic/Magdir/glibc - copied unchanged from r354582, vendor/file/dist/magic/Magdir/glibc head/contrib/file/magic/Magdir/hardware - copied unchanged from r354582, vendor/file/dist/magic/Magdir/hardware head/contrib/file/magic/Magdir/kicad - copied unchanged from r354582, vendor/file/dist/magic/Magdir/kicad head/contrib/file/magic/Magdir/numpy - copied unchanged from r354582, vendor/file/dist/magic/Magdir/numpy head/contrib/file/magic/Magdir/rpmsg - copied unchanged from r354582, vendor/file/dist/magic/Magdir/rpmsg head/contrib/file/src/is_json.c - copied unchanged from r354582, vendor/file/dist/src/is_json.c head/contrib/file/tests/CVE-2014-1943.result - copied unchanged from r354582, vendor/file/dist/tests/CVE-2014-1943.result head/contrib/file/tests/CVE-2014-1943.testfile - copied unchanged from r354582, vendor/file/dist/tests/CVE-2014-1943.testfile head/contrib/file/tests/fit-map-data.result - copied unchanged from r354582, vendor/file/dist/tests/fit-map-data.result head/contrib/file/tests/fit-map-data.testfile - copied unchanged from r354582, vendor/file/dist/tests/fit-map-data.testfile head/contrib/file/tests/issue359xlsx.result - copied unchanged from r354582, vendor/file/dist/tests/issue359xlsx.result head/contrib/file/tests/issue359xlsx.testfile - copied unchanged from r354582, vendor/file/dist/tests/issue359xlsx.testfile head/contrib/file/tests/json1.result - copied unchanged from r354582, vendor/file/dist/tests/json1.result head/contrib/file/tests/json1.testfile - copied unchanged from r354582, vendor/file/dist/tests/json1.testfile head/contrib/file/tests/json2.result - copied unchanged from r354582, vendor/file/dist/tests/json2.result head/contrib/file/tests/json2.testfile - copied unchanged from r354582, vendor/file/dist/tests/json2.testfile head/contrib/file/tests/json3.result - copied unchanged from r354582, vendor/file/dist/tests/json3.result head/contrib/file/tests/json3.testfile - copied unchanged from r354582, vendor/file/dist/tests/json3.testfile head/contrib/file/tests/regex-eol.magic - copied unchanged from r354582, vendor/file/dist/tests/regex-eol.magic head/contrib/file/tests/regex-eol.result - copied unchanged from r354582, vendor/file/dist/tests/regex-eol.result head/contrib/file/tests/regex-eol.testfile - copied unchanged from r354582, vendor/file/dist/tests/regex-eol.testfile head/contrib/file/tests/zstd-3-skippable-frames.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-3-skippable-frames.result head/contrib/file/tests/zstd-dictionary-0.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-dictionary-0.result head/contrib/file/tests/zstd-dictionary-1.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-dictionary-1.result head/contrib/file/tests/zstd-dictionary-2.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-dictionary-2.result head/contrib/file/tests/zstd-skippable-frame-0.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-skippable-frame-0.result head/contrib/file/tests/zstd-skippable-frame-4.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-skippable-frame-4.result head/contrib/file/tests/zstd-skippable-frame-8.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-skippable-frame-8.result head/contrib/file/tests/zstd-skippable-frame-C.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-skippable-frame-C.result head/contrib/file/tests/zstd-v0.2-FF.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.2-FF.result head/contrib/file/tests/zstd-v0.2-FF.testfile - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.2-FF.testfile head/contrib/file/tests/zstd-v0.3-FF.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.3-FF.result head/contrib/file/tests/zstd-v0.3-FF.testfile - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.3-FF.testfile head/contrib/file/tests/zstd-v0.4-FF.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.4-FF.result head/contrib/file/tests/zstd-v0.4-FF.testfile - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.4-FF.testfile head/contrib/file/tests/zstd-v0.5-FF.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.5-FF.result head/contrib/file/tests/zstd-v0.5-FF.testfile - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.5-FF.testfile head/contrib/file/tests/zstd-v0.6-FF.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.6-FF.result head/contrib/file/tests/zstd-v0.6-FF.testfile - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.6-FF.testfile head/contrib/file/tests/zstd-v0.7-00.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.7-00.result head/contrib/file/tests/zstd-v0.7-21.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.7-21.result head/contrib/file/tests/zstd-v0.7-21.testfile - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.7-21.testfile head/contrib/file/tests/zstd-v0.7-22.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.7-22.result head/contrib/file/tests/zstd-v0.7-22.testfile - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.7-22.testfile head/contrib/file/tests/zstd-v0.8-00.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.8-00.result head/contrib/file/tests/zstd-v0.8-01.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.8-01.result head/contrib/file/tests/zstd-v0.8-01.testfile - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.8-01.testfile head/contrib/file/tests/zstd-v0.8-02.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.8-02.result head/contrib/file/tests/zstd-v0.8-02.testfile - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.8-02.testfile head/contrib/file/tests/zstd-v0.8-03.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.8-03.result head/contrib/file/tests/zstd-v0.8-03.testfile - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.8-03.testfile head/contrib/file/tests/zstd-v0.8-16.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.8-16.result head/contrib/file/tests/zstd-v0.8-16.testfile - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.8-16.testfile head/contrib/file/tests/zstd-v0.8-20.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.8-20.result head/contrib/file/tests/zstd-v0.8-20.testfile - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.8-20.testfile head/contrib/file/tests/zstd-v0.8-21.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.8-21.result head/contrib/file/tests/zstd-v0.8-21.testfile - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.8-21.testfile head/contrib/file/tests/zstd-v0.8-22.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.8-22.result head/contrib/file/tests/zstd-v0.8-22.testfile - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.8-22.testfile head/contrib/file/tests/zstd-v0.8-23.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.8-23.result head/contrib/file/tests/zstd-v0.8-23.testfile - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.8-23.testfile head/contrib/file/tests/zstd-v0.8-F4.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.8-F4.result head/contrib/file/tests/zstd-v0.8-F4.testfile - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.8-F4.testfile head/contrib/file/tests/zstd-v0.8-FF.result - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.8-FF.result head/contrib/file/tests/zstd-v0.8-FF.testfile - copied unchanged from r354582, vendor/file/dist/tests/zstd-v0.8-FF.testfile Modified: head/contrib/file/AUTHORS head/contrib/file/COPYING head/contrib/file/ChangeLog head/contrib/file/NEWS head/contrib/file/README head/contrib/file/config.h.in head/contrib/file/configure head/contrib/file/configure.ac head/contrib/file/doc/file.man head/contrib/file/doc/libmagic.man head/contrib/file/doc/magic.man head/contrib/file/magic/Header head/contrib/file/magic/Magdir/acorn head/contrib/file/magic/Magdir/adventure head/contrib/file/magic/Magdir/algol68 head/contrib/file/magic/Magdir/amigaos head/contrib/file/magic/Magdir/android head/contrib/file/magic/Magdir/animation head/contrib/file/magic/Magdir/apple head/contrib/file/magic/Magdir/archive head/contrib/file/magic/Magdir/audio head/contrib/file/magic/Magdir/basis head/contrib/file/magic/Magdir/ber head/contrib/file/magic/Magdir/bioinformatics head/contrib/file/magic/Magdir/blcr head/contrib/file/magic/Magdir/blender head/contrib/file/magic/Magdir/c-lang head/contrib/file/magic/Magdir/cad head/contrib/file/magic/Magdir/cafebabe head/contrib/file/magic/Magdir/coff head/contrib/file/magic/Magdir/commands head/contrib/file/magic/Magdir/compress head/contrib/file/magic/Magdir/console head/contrib/file/magic/Magdir/coverage head/contrib/file/magic/Magdir/ctf head/contrib/file/magic/Magdir/cups head/contrib/file/magic/Magdir/database head/contrib/file/magic/Magdir/dataone head/contrib/file/magic/Magdir/dbpf head/contrib/file/magic/Magdir/dolby head/contrib/file/magic/Magdir/dyadic head/contrib/file/magic/Magdir/ebml head/contrib/file/magic/Magdir/elf head/contrib/file/magic/Magdir/erlang head/contrib/file/magic/Magdir/esri head/contrib/file/magic/Magdir/filesystems head/contrib/file/magic/Magdir/finger head/contrib/file/magic/Magdir/flash head/contrib/file/magic/Magdir/fonts head/contrib/file/magic/Magdir/fsav head/contrib/file/magic/Magdir/games head/contrib/file/magic/Magdir/geo head/contrib/file/magic/Magdir/gnome head/contrib/file/magic/Magdir/gnu head/contrib/file/magic/Magdir/graphviz head/contrib/file/magic/Magdir/guile head/contrib/file/magic/Magdir/hitachi-sh head/contrib/file/magic/Magdir/hp head/contrib/file/magic/Magdir/ibm6000 head/contrib/file/magic/Magdir/images head/contrib/file/magic/Magdir/intel head/contrib/file/magic/Magdir/isz head/contrib/file/magic/Magdir/java head/contrib/file/magic/Magdir/jpeg head/contrib/file/magic/Magdir/keepass head/contrib/file/magic/Magdir/kerberos head/contrib/file/magic/Magdir/kml head/contrib/file/magic/Magdir/linux head/contrib/file/magic/Magdir/lisp head/contrib/file/magic/Magdir/llvm head/contrib/file/magic/Magdir/lua head/contrib/file/magic/Magdir/m4 head/contrib/file/magic/Magdir/macintosh head/contrib/file/magic/Magdir/mail.news head/contrib/file/magic/Magdir/map head/contrib/file/magic/Magdir/marc21 head/contrib/file/magic/Magdir/matroska head/contrib/file/magic/Magdir/mercurial head/contrib/file/magic/Magdir/metastore head/contrib/file/magic/Magdir/microfocus head/contrib/file/magic/Magdir/misctools head/contrib/file/magic/Magdir/modem head/contrib/file/magic/Magdir/mozilla head/contrib/file/magic/Magdir/msdos head/contrib/file/magic/Magdir/msooxml head/contrib/file/magic/Magdir/msvc head/contrib/file/magic/Magdir/neko head/contrib/file/magic/Magdir/netbsd head/contrib/file/magic/Magdir/nitpicker head/contrib/file/magic/Magdir/ole2compounddocs head/contrib/file/magic/Magdir/palm head/contrib/file/magic/Magdir/parrot head/contrib/file/magic/Magdir/pbf head/contrib/file/magic/Magdir/pc98 head/contrib/file/magic/Magdir/pgp head/contrib/file/magic/Magdir/polyml head/contrib/file/magic/Magdir/printer head/contrib/file/magic/Magdir/psl head/contrib/file/magic/Magdir/pwsafe head/contrib/file/magic/Magdir/python head/contrib/file/magic/Magdir/qt head/contrib/file/magic/Magdir/revision head/contrib/file/magic/Magdir/riff head/contrib/file/magic/Magdir/ruby head/contrib/file/magic/Magdir/scientific head/contrib/file/magic/Magdir/selinux head/contrib/file/magic/Magdir/sendmail head/contrib/file/magic/Magdir/sequent head/contrib/file/magic/Magdir/sgml head/contrib/file/magic/Magdir/sniffer head/contrib/file/magic/Magdir/sql head/contrib/file/magic/Magdir/sun head/contrib/file/magic/Magdir/sysex head/contrib/file/magic/Magdir/tcl head/contrib/file/magic/Magdir/terminfo head/contrib/file/magic/Magdir/tex head/contrib/file/magic/Magdir/tplink head/contrib/file/magic/Magdir/unicode head/contrib/file/magic/Magdir/varied.script head/contrib/file/magic/Magdir/virtual head/contrib/file/magic/Magdir/warc head/contrib/file/magic/Magdir/webassembly head/contrib/file/magic/Magdir/windows head/contrib/file/magic/Magdir/wordprocessors head/contrib/file/magic/Magdir/wsdl head/contrib/file/magic/Magdir/xwindows head/contrib/file/magic/Magdir/yara head/contrib/file/magic/Magdir/zip head/contrib/file/magic/Makefile.am head/contrib/file/magic/Makefile.in head/contrib/file/src/Makefile.am head/contrib/file/src/Makefile.in head/contrib/file/src/apprentice.c head/contrib/file/src/apptype.c head/contrib/file/src/ascmagic.c head/contrib/file/src/asprintf.c head/contrib/file/src/buffer.c head/contrib/file/src/cdf.c head/contrib/file/src/cdf.h head/contrib/file/src/cdf_time.c head/contrib/file/src/compress.c head/contrib/file/src/der.c head/contrib/file/src/dprintf.c head/contrib/file/src/elfclass.h head/contrib/file/src/encoding.c head/contrib/file/src/file.c head/contrib/file/src/file.h head/contrib/file/src/fmtcheck.c head/contrib/file/src/fsmagic.c head/contrib/file/src/funcs.c head/contrib/file/src/getopt_long.c head/contrib/file/src/is_tar.c head/contrib/file/src/magic.c head/contrib/file/src/magic.h.in head/contrib/file/src/mygetopt.h head/contrib/file/src/print.c head/contrib/file/src/readcdf.c head/contrib/file/src/readelf.c head/contrib/file/src/readelf.h head/contrib/file/src/seccomp.c head/contrib/file/src/softmagic.c head/contrib/file/src/vasprintf.c head/contrib/file/tests/Makefile.am head/contrib/file/tests/Makefile.in head/lib/libmagic/Makefile head/lib/libmagic/config.h Directory Properties: head/contrib/file/ (props changed) Modified: head/contrib/file/AUTHORS ============================================================================== --- head/contrib/file/AUTHORS Sun Nov 10 15:07:36 2019 (r354594) +++ head/contrib/file/AUTHORS Sun Nov 10 17:00:23 2019 (r354595) @@ -1 +1 @@ -See COPYING. \ No newline at end of file +See COPYING. Modified: head/contrib/file/COPYING ============================================================================== --- head/contrib/file/COPYING Sun Nov 10 15:07:36 2019 (r354594) +++ head/contrib/file/COPYING Sun Nov 10 17:00:23 2019 (r354595) @@ -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: head/contrib/file/ChangeLog ============================================================================== --- head/contrib/file/ChangeLog Sun Nov 10 15:07:36 2019 (r354594) +++ head/contrib/file/ChangeLog Sun Nov 10 17:00:23 2019 (r354595) @@ -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: head/contrib/file/NEWS ============================================================================== --- head/contrib/file/NEWS Sun Nov 10 15:07:36 2019 (r354594) +++ head/contrib/file/NEWS Sun Nov 10 17:00:23 2019 (r354595) @@ -1 +1 @@ -See ChangeLog. \ No newline at end of file +See ChangeLog. Modified: head/contrib/file/README ============================================================================== --- head/contrib/file/README Sun Nov 10 15:07:36 2019 (r354594) +++ head/contrib/file/README Sun Nov 10 17:00:23 2019 (r354595) @@ -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: head/contrib/file/config.h.in ============================================================================== --- head/contrib/file/config.h.in Sun Nov 10 15:07:36 2019 (r354594) +++ head/contrib/file/config.h.in Sun Nov 10 17:00:23 2019 (r354595) @@ -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: head/contrib/file/configure ============================================================================== --- head/contrib/file/configure Sun Nov 10 15:07:36 2019 (r354594) +++ head/contrib/file/configure Sun Nov 10 17:00:23 2019 (r354595) @@ -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: head/contrib/file/configure.ac ============================================================================== --- head/contrib/file/configure.ac Sun Nov 10 15:07:36 2019 (r354594) +++ head/contrib/file/configure.ac Sun Nov 10 17:00:23 2019 (r354595) @@ -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: head/contrib/file/doc/file.man ============================================================================== --- head/contrib/file/doc/file.man Sun Nov 10 15:07:36 2019 (r354594) +++ head/contrib/file/doc/file.man Sun Nov 10 17:00:23 2019 (r354595) @@ -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 @@ -629,11 +633,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: head/contrib/file/doc/libmagic.man ============================================================================== --- head/contrib/file/doc/libmagic.man Sun Nov 10 15:07:36 2019 (r354594) +++ head/contrib/file/doc/libmagic.man Sun Nov 10 17:00:23 2019 (r354595) @@ -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: head/contrib/file/doc/magic.man ============================================================================== --- head/contrib/file/doc/magic.man Sun Nov 10 15:07:36 2019 (r354594) +++ head/contrib/file/doc/magic.man Sun Nov 10 17:00:23 2019 (r354595) @@ -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: head/contrib/file/magic/Header ============================================================================== --- head/contrib/file/magic/Header Sun Nov 10 15:07:36 2019 (r354594) +++ head/contrib/file/magic/Header Sun Nov 10 17:00:23 2019 (r354595) @@ -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: head/contrib/file/magic/Magdir/acorn ============================================================================== --- head/contrib/file/magic/Magdir/acorn Sun Nov 10 15:07:36 2019 (r354594) +++ head/contrib/file/magic/Magdir/acorn Sun Nov 10 17:00:23 2019 (r354595) @@ -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: head/contrib/file/magic/Magdir/adventure ============================================================================== --- head/contrib/file/magic/Magdir/adventure Sun Nov 10 15:07:36 2019 (r354594) +++ head/contrib/file/magic/Magdir/adventure Sun Nov 10 17:00:23 2019 (r354595) @@ -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: head/contrib/file/magic/Magdir/algol68 ============================================================================== --- head/contrib/file/magic/Magdir/algol68 Sun Nov 10 15:07:36 2019 (r354594) +++ head/contrib/file/magic/Magdir/algol68 Sun Nov 10 17:00:23 2019 (r354595) @@ -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: head/contrib/file/magic/Magdir/amigaos ============================================================================== --- head/contrib/file/magic/Magdir/amigaos Sun Nov 10 15:07:36 2019 (r354594) +++ head/contrib/file/magic/Magdir/amigaos Sun Nov 10 17:00:23 2019 (r354595) @@ -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: head/contrib/file/magic/Magdir/android ============================================================================== --- head/contrib/file/magic/Magdir/android Sun Nov 10 15:07:36 2019 (r354594) +++ head/contrib/file/magic/Magdir/android Sun Nov 10 17:00:23 2019 (r354595) @@ -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 ***