head 1.1; branch 1.1.1; access; symbols FILE5_48:1.1.1.6 netbsd-11-0-RC4:1.1.1.5 netbsd-11-0-RC3:1.1.1.5 netbsd-11-0-RC2:1.1.1.5 netbsd-11-0-RC1:1.1.1.5 perseant-exfatfs-base-20250801:1.1.1.5 netbsd-11:1.1.1.5.0.14 netbsd-11-base:1.1.1.5 netbsd-10-1-RELEASE:1.1.1.5 perseant-exfatfs-base-20240630:1.1.1.5 perseant-exfatfs:1.1.1.5.0.12 perseant-exfatfs-base:1.1.1.5 netbsd-8-3-RELEASE:1.1.1.3 netbsd-9-4-RELEASE:1.1.1.5 netbsd-10-0-RELEASE:1.1.1.5 netbsd-10-0-RC6:1.1.1.5 netbsd-10-0-RC5:1.1.1.5 netbsd-10-0-RC4:1.1.1.5 netbsd-10-0-RC3:1.1.1.5 netbsd-10-0-RC2:1.1.1.5 netbsd-10-0-RC1:1.1.1.5 FILE5_45:1.1.1.5 netbsd-10:1.1.1.5.0.10 netbsd-10-base:1.1.1.5 FILE5_43:1.1.1.5 netbsd-9-3-RELEASE:1.1.1.5 cjep_sun2x-base1:1.1.1.5 cjep_sun2x:1.1.1.5.0.8 cjep_sun2x-base:1.1.1.5 cjep_staticlib_x-base1:1.1.1.5 netbsd-9-2-RELEASE:1.1.1.5 cjep_staticlib_x:1.1.1.5.0.6 cjep_staticlib_x-base:1.1.1.5 FILE5_40:1.1.1.5 netbsd-9-1-RELEASE:1.1.1.5 FILE5_39:1.1.1.5 phil-wifi-20200421:1.1.1.5 phil-wifi-20200411:1.1.1.5 is-mlppp:1.1.1.5.0.4 is-mlppp-base:1.1.1.5 phil-wifi-20200406:1.1.1.5 netbsd-8-2-RELEASE:1.1.1.3 netbsd-9-0-RELEASE:1.1.1.5 netbsd-9-0-RC2:1.1.1.5 FILE5_38:1.1.1.5 netbsd-9-0-RC1:1.1.1.5 phil-wifi-20191119:1.1.1.5 netbsd-9:1.1.1.5.0.2 netbsd-9-base:1.1.1.5 phil-wifi-20190609:1.1.1.5 netbsd-8-1-RELEASE:1.1.1.3 FILE5_37:1.1.1.5 netbsd-8-1-RC1:1.1.1.3 pgoyette-compat-merge-20190127:1.1.1.3.30.1 pgoyette-compat-20190127:1.1.1.4 pgoyette-compat-20190118:1.1.1.4 pgoyette-compat-1226:1.1.1.4 pgoyette-compat-1126:1.1.1.4 pgoyette-compat-1020:1.1.1.4 FILE5_35:1.1.1.4 pgoyette-compat-0930:1.1.1.4 pgoyette-compat-0906:1.1.1.4 netbsd-7-2-RELEASE:1.1.1.3 pgoyette-compat-0728:1.1.1.4 netbsd-8-0-RELEASE:1.1.1.3 phil-wifi:1.1.1.4.0.2 phil-wifi-base:1.1.1.4 pgoyette-compat-0625:1.1.1.4 netbsd-8-0-RC2:1.1.1.3 pgoyette-compat-0521:1.1.1.4 pgoyette-compat-0502:1.1.1.4 pgoyette-compat-0422:1.1.1.4 netbsd-8-0-RC1:1.1.1.3 FILE5_33:1.1.1.4 pgoyette-compat-0415:1.1.1.3 pgoyette-compat-0407:1.1.1.3 pgoyette-compat-0330:1.1.1.3 pgoyette-compat-0322:1.1.1.3 pgoyette-compat-0315:1.1.1.3 netbsd-7-1-2-RELEASE:1.1.1.3 pgoyette-compat:1.1.1.3.0.30 pgoyette-compat-base:1.1.1.3 netbsd-7-1-1-RELEASE:1.1.1.3 matt-nb8-mediatek:1.1.1.3.0.28 matt-nb8-mediatek-base:1.1.1.3 FILE5_32:1.1.1.3 perseant-stdc-iso10646:1.1.1.3.0.26 perseant-stdc-iso10646-base:1.1.1.3 netbsd-8:1.1.1.3.0.24 netbsd-8-base:1.1.1.3 FILE5_31:1.1.1.3 prg-localcount2-base3:1.1.1.3 prg-localcount2-base2:1.1.1.3 prg-localcount2-base1:1.1.1.3 prg-localcount2:1.1.1.3.0.22 prg-localcount2-base:1.1.1.3 pgoyette-localcount-20170426:1.1.1.3 bouyer-socketcan-base1:1.1.1.3 pgoyette-localcount-20170320:1.1.1.3 netbsd-7-1:1.1.1.3.0.20 netbsd-7-1-RELEASE:1.1.1.3 netbsd-7-1-RC2:1.1.1.3 FILE5_30:1.1.1.3 netbsd-7-nhusb-base-20170116:1.1.1.3 bouyer-socketcan:1.1.1.3.0.18 bouyer-socketcan-base:1.1.1.3 pgoyette-localcount-20170107:1.1.1.3 netbsd-7-1-RC1:1.1.1.3 pgoyette-localcount-20161104:1.1.1.3 netbsd-7-0-2-RELEASE:1.1.1.3 localcount-20160914:1.1.1.3 netbsd-7-nhusb:1.1.1.3.0.16 netbsd-7-nhusb-base:1.1.1.3 pgoyette-localcount-20160806:1.1.1.3 pgoyette-localcount-20160726:1.1.1.3 pgoyette-localcount:1.1.1.3.0.14 pgoyette-localcount-base:1.1.1.3 netbsd-7-0-1-RELEASE:1.1.1.3 netbsd-7-0:1.1.1.3.0.12 netbsd-7-0-RELEASE:1.1.1.3 netbsd-7-0-RC3:1.1.1.3 netbsd-7-0-RC2:1.1.1.3 netbsd-7-0-RC1:1.1.1.3 FILE5_22:1.1.1.3 FILE5_20:1.1.1.3 netbsd-6-0-6-RELEASE:1.1.1.2 netbsd-6-1-5-RELEASE:1.1.1.2 netbsd-7:1.1.1.3.0.10 netbsd-7-base:1.1.1.3 FILE5_19:1.1.1.3 yamt-pagecache-base9:1.1.1.3 yamt-pagecache-tag8:1.1.1.2 netbsd-6-1-4-RELEASE:1.1.1.2 netbsd-6-0-5-RELEASE:1.1.1.2 tls-earlyentropy:1.1.1.3.0.8 tls-earlyentropy-base:1.1.1.3 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.3 riastradh-drm2-base3:1.1.1.3 netbsd-6-1-3-RELEASE:1.1.1.2 netbsd-6-0-4-RELEASE:1.1.1.2 FILE5_16:1.1.1.3 netbsd-6-1-2-RELEASE:1.1.1.2 netbsd-6-0-3-RELEASE:1.1.1.2 netbsd-6-1-1-RELEASE:1.1.1.2 riastradh-drm2-base2:1.1.1.3 riastradh-drm2-base1:1.1.1.3 riastradh-drm2:1.1.1.3.0.6 riastradh-drm2-base:1.1.1.3 netbsd-6-1:1.1.1.2.0.16 netbsd-6-0-2-RELEASE:1.1.1.2 netbsd-6-1-RELEASE:1.1.1.2 khorben-n900:1.1.1.3.0.4 netbsd-6-1-RC4:1.1.1.2 netbsd-6-1-RC3:1.1.1.2 agc-symver:1.1.1.3.0.2 agc-symver-base:1.1.1.3 FILE5_14:1.1.1.3 netbsd-6-1-RC2:1.1.1.2 netbsd-6-1-RC1:1.1.1.2 yamt-pagecache-base8:1.1.1.2 FILE_5_12:1.1.1.2 netbsd-6-0-1-RELEASE:1.1.1.2 yamt-pagecache-base7:1.1.1.2 matt-nb6-plus-nbase:1.1.1.2 yamt-pagecache-base6:1.1.1.2 netbsd-6-0:1.1.1.2.0.12 netbsd-6-0-RELEASE:1.1.1.2 netbsd-6-0-RC2:1.1.1.2 tls-maxphys:1.1.1.2.0.10 tls-maxphys-base:1.1.1.3 matt-nb6-plus:1.1.1.2.0.8 matt-nb6-plus-base:1.1.1.2 netbsd-6-0-RC1:1.1.1.2 yamt-pagecache-base5:1.1.1.2 yamt-pagecache-base4:1.1.1.2 FILE5_11:1.1.1.2 netbsd-6:1.1.1.2.0.6 netbsd-6-base:1.1.1.2 yamt-pagecache-base3:1.1.1.2 yamt-pagecache-base2:1.1.1.2 yamt-pagecache:1.1.1.2.0.4 yamt-pagecache-base:1.1.1.2 FILE5_09:1.1.1.2 cherry-xenmp:1.1.1.2.0.2 cherry-xenmp-base:1.1.1.2 FILE5_07:1.1.1.2 bouyer-quota2-nbase:1.1.1.1 bouyer-quota2:1.1.1.1.0.4 bouyer-quota2-base:1.1.1.1 matt-mips64-premerge-20101231:1.1.1.1 matt-premerge-20091211:1.1.1.1 jym-xensuspend-base:1.1.1.1 jym-xensuspend:1.1.1.1.0.2 jym-xensuspend-nbase:1.1.1.1 FILE5_03:1.1.1.1 CHRISTOS:1.1.1; locks; strict; comment @# @; 1.1 date 2009.05.08.16.35.09; author christos; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2009.05.08.16.35.09; author christos; state Exp; branches 1.1.1.1.2.1; next 1.1.1.2; 1.1.1.2 date 2011.05.12.20.47.04; author christos; state Exp; branches 1.1.1.2.4.1 1.1.1.2.10.1; next 1.1.1.3; 1.1.1.3 date 2013.03.23.15.49.18; author christos; state Exp; branches 1.1.1.3.30.1; next 1.1.1.4; 1.1.1.4 date 2018.04.15.19.32.48; author christos; state Exp; branches 1.1.1.4.2.1; next 1.1.1.5; commitid unKSwpX2g9VqBzyA; 1.1.1.5 date 2019.05.22.17.19.57; author christos; state Exp; branches; next 1.1.1.6; commitid VXeNRYYruN1MWdoB; 1.1.1.6 date 2026.06.10.15.59.14; author christos; state Exp; branches; next ; commitid 3UWc0DrzTz7bHgJG; 1.1.1.1.2.1 date 2009.05.08.16.35.09; author jym; state dead; branches; next 1.1.1.1.2.2; 1.1.1.1.2.2 date 2009.05.13.18.51.59; author jym; state Exp; branches; next ; 1.1.1.2.4.1 date 2014.05.22.15.44.59; author yamt; state Exp; branches; next ; commitid tYJXbWAuFvTh7yBx; 1.1.1.2.10.1 date 2013.06.23.06.26.32; author tls; state Exp; branches; next ; commitid OnlO1cBgtQRcIHUw; 1.1.1.3.30.1 date 2018.04.22.07.20.08; author pgoyette; state Exp; branches; next ; commitid W6xykws0Zbl4kpzA; 1.1.1.4.2.1 date 2019.06.10.21.44.46; author christos; state Exp; branches; next ; commitid jtc8rnCzWiEEHGqB; desc @@ 1.1 log @Initial revision @ text @ #------------------------------------------------------------------------------ # file(1) magic for revision control files # From Hendrik Scholz 0 string /1\ :pserver: cvs password text file # Conary changesets # From: Jonathan Smith 0 belong 0xea3f81bb Conary changeset data # Type: Git bundles (git-bundle) # From: Josh Triplett 0 string #\ v2\ git\ bundle\n Git bundle # Type: Mercurial bundles # From: Seo Sanghyeon 0 string HG10 Mercurial bundle, >4 string UN uncompressed >4 string BZ bzip2 compressed @ 1.1.1.1 log @from ftp.astron.com @ text @@ 1.1.1.2 log @from ftp.astron.com. - many security related fixes - no MAXPATHLEN limits - fixed missing text specification on ascii magic - new ``pascal'' style string formats - whitespace comparison fix - more magic @ text @a2 1 # $File: revision,v 1.8 2010/11/25 15:00:12 christos Exp $ d5 1 a5 1 0 string/t /1\ :pserver: cvs password text file a14 21 # Type: Git pack # From: Adam Buchbinder # The actual magic is 'PACK', but that clashes with Doom/Quake packs. However, # those have a little-endian offset immediately following the magic 'PACK', # the first byte of which is never 0, while the first byte of the Git pack # version, since it's a tiny number stored in big-endian format, is always 0. 0 string PACK\0 Git pack >4 belong >0 \b, version %d >>8 belong >0 \b, %d objects # Type: Git pack index # From: Adam Buchbinder 0 string \377tOc Git pack index >4 belong =2 \b, version 2 # Type: Git index file # From: Frédéric Brière 0 string DIRC Git index >4 belong >0 \b, version %d >>8 belong >0 \b, %d entries a19 11 # Type: Subversion (SVN) dumps # From: Uwe Zeisberger 0 string SVN-fs-dump-format-version: Subversion dumpfile >28 string >\0 (version: %s) # Type: Bazaar revision bundles and merge requests # URL: http://www.bazaar-vcs.org/ # From: Jelmer Vernooij 0 string #\ Bazaar\ revision\ bundle\ v Bazaar Bundle 0 string #\ Bazaar\ merge\ directive\ format Bazaar merge directive @ 1.1.1.2.4.1 log @sync with head. for a reference, the tree before this commit was tagged as yamt-pagecache-tag8. this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments") @ text @d3 1 a3 1 # $File: revision,v 1.9 2013/02/06 14:18:52 christos Exp $ d32 1 a32 1 # From: Frederic Briare @ 1.1.1.2.10.1 log @resync from head @ text @d3 1 a3 1 # $File: revision,v 1.9 2013/02/06 14:18:52 christos Exp $ d32 1 a32 1 # From: Frederic Briare @ 1.1.1.3 log @import file-5.14 changes are "name" + "use" keyword features, bug fixes @ text @d3 1 a3 1 # $File: revision,v 1.9 2013/02/06 14:18:52 christos Exp $ d32 1 a32 1 # From: Frederic Briare @ 1.1.1.3.30.1 log @Sync with HEAD @ text @d3 1 a3 1 # $File: revision,v 1.10 2017/10/19 16:40:37 christos Exp $ a17 3 # Update: Joerg Jenderek # URL: http://fileformats.archiveteam.org/wiki/Git # reference: https://github.com/git/git/blob/master/Documentation/technical/pack-format.txt d22 3 a24 14 0 string PACK # GRR: line above is too general as it matches also PackDir archive ./acorn # test for major version. Git 2017 accepts version number 2 or 3 >4 ubelong <9 # Acorn PackDir with method 0 compression has root like ADFS::HardDisc4.$.AsylumSrc # or SystemDevice::foobar >>9 search/13 :: # but in git binary >>9 default x Git pack !:mime application/x-git !:ext pack # 4 GB limit implies unsigned integer >>>4 ubelong x \b, version %u >>>8 ubelong x \b, %u objects @ 1.1.1.4 log @2018-04-15 14:52 Christos Zoulas * release 5.33 2018-02-24 14:50 Christos Zoulas * extend the support for ${x?:} expansions for magic descriptions 2018-02-21 16:25 Christos Zoulas * add support for ${x?:} in mime types to handle pie binaries. 2017-11-03 9:23 Christos Zoulas * add support for negative offsets (offsets from the end of file) 2017-09-26 8:22 Christos Zoulas * close the file on error when writing magic (Steve Grubb) 2017-09-24 12:02 Christos Zoulas * seccomp support (Paul Moore) 2017-09-02 11:53 Christos Zoulas * release 5.32 2017-08-28 16:37 Christos Zoulas * Always reset state in {file,buffer}_apprentice (Krzysztof Wilczynski) 2017-08-27 03:55 Christos Zoulas * Fix always true condition (Thomas Jarosch) 2017-05-24 17:30 Christos Zoulas * pickier parsing of numeric values in magic files. 2017-05-23 17:55 Christos Zoulas * PR/615 add magic_getflags() @ text @d3 1 a3 1 # $File: revision,v 1.10 2017/10/19 16:40:37 christos Exp $ a17 3 # Update: Joerg Jenderek # URL: http://fileformats.archiveteam.org/wiki/Git # reference: https://github.com/git/git/blob/master/Documentation/technical/pack-format.txt d22 3 a24 14 0 string PACK # GRR: line above is too general as it matches also PackDir archive ./acorn # test for major version. Git 2017 accepts version number 2 or 3 >4 ubelong <9 # Acorn PackDir with method 0 compression has root like ADFS::HardDisc4.$.AsylumSrc # or SystemDevice::foobar >>9 search/13 :: # but in git binary >>9 default x Git pack !:mime application/x-git !:ext pack # 4 GB limit implies unsigned integer >>>4 ubelong x \b, version %u >>>8 ubelong x \b, %u objects @ 1.1.1.4.2.1 log @Sync with HEAD @ text @d3 1 a3 1 # $File: revision,v 1.11 2019/04/19 00:42:27 christos Exp $ d63 1 a63 1 # URL: https://www.bazaar-vcs.org/ @ 1.1.1.5 log @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 @ text @d3 1 a3 1 # $File: revision,v 1.11 2019/04/19 00:42:27 christos Exp $ d63 1 a63 1 # URL: https://www.bazaar-vcs.org/ @ 1.1.1.6 log @Import file-5.48 (previous was file-5.45) 2026-05-07 11:32 Christos Zoulas * release 5.48 2026-05-11 15:55 Christos Zoulas * add landlock support (valoq) 2026-04-19 15:55 Christos Zoulas * add BE/LE GUID 2026-04-17 11:05 Christos Zoulas * multiple fixes to prevent integer overflow in 32 bits (kerwin) 2026-04-15 12:40 Christos Zoulas * PR/745: streamout: Don't flush when trying to set negative offsets on pipes, just continue, fixes 'cat file.zip | file -' * PR/753: vmihalko: Fix race is magic_getpath() 2026-03-11 15:14 Christos Zoulas * PR/728: Anton Monroe: Reinstate regex/c 2026-02-26 11:32 Christos Zoulas * release 5.47 2026-02-04 09:54 Christos Zoulas * Better multi-compound document identification by following the order of the directories entries. (Thomas Ledoux) 2026-01-19 14:00 Christos Zoulas * if stat fails, don't attempt to restore times (Steven Grubb) 2025-05-28 15:20 Christos Zoulas * PR/622: Odd_Bloke: Handle negative offsets in file_buffer(), when fd is not available. 2025-05-28 12:50 Christos Zoulas * PR/655: jsummers: Obey str_flags in strings like we do for search and regex * PR/659: Pitzl: Apply MAGIC_CONTINUE to annotations; i.e. print only the first, unless -k is specified. 2024-12-19 14:44 Christos Zoulas * PR/592: allow + in format strings * PR/592: signed operations should be done in signed context 2024-12-05 13:50 Christos Zoulas * PR/578: jsummers: Don't crash on cygwin when tm_mon == -1 * PR/579: net147: Fix stack overrun. 2024-11-27 14:44 Christos Zoulas * release 5.46 * Add OFFPOSITIVE 2024-11-25 13:56 Christos Zoulas * avoid leaking symbols in libmagic 2024-11-10 13:56 Christos Zoulas * PR/562: jsummers: Search/regex offsets are absolute to the beginning of the file, so adjust them by subtracting the offset that the "use" starts so that we don't double-count it. 2024-11-09 19:30 Christos Zoulas * PR/543: matshch: bump nbuf so we can get the flags into the buffer. 2024-11-02 14:34 Christos Zoulas * Add Android elf notes (enh) 2023-12-29 12:55 Christos Zoulas * Add limit for number of magic warnings allowed 2023-07-29 12:55 Christos Zoulas * check regex bounds (found by clusterfuzz) @ text @d3 1 a3 1 # $File: revision,v 1.12 2024/08/30 17:29:28 christos Exp $ a4 1 d16 24 @ 1.1.1.1.2.1 log @file revision was added on branch jym-xensuspend on 2009-05-13 18:51:59 +0000 @ text @d1 19 @ 1.1.1.1.2.2 log @Sync with HEAD. Second commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html @ text @a0 19 #------------------------------------------------------------------------------ # file(1) magic for revision control files # From Hendrik Scholz 0 string /1\ :pserver: cvs password text file # Conary changesets # From: Jonathan Smith 0 belong 0xea3f81bb Conary changeset data # Type: Git bundles (git-bundle) # From: Josh Triplett 0 string #\ v2\ git\ bundle\n Git bundle # Type: Mercurial bundles # From: Seo Sanghyeon 0 string HG10 Mercurial bundle, >4 string UN uncompressed >4 string BZ bzip2 compressed @