1*82c5fa3eSPeter Avalos.\" $File: libmagic.man,v 1.34 2014/12/16 23:18:40 christos Exp $ 2327e51cbSPeter Avalos.\" 3327e51cbSPeter Avalos.\" Copyright (c) Christos Zoulas 2003. 4327e51cbSPeter Avalos.\" All Rights Reserved. 5327e51cbSPeter Avalos.\" 6327e51cbSPeter Avalos.\" Redistribution and use in source and binary forms, with or without 7327e51cbSPeter Avalos.\" modification, are permitted provided that the following conditions 8327e51cbSPeter Avalos.\" are met: 9327e51cbSPeter Avalos.\" 1. Redistributions of source code must retain the above copyright 10327e51cbSPeter Avalos.\" notice immediately at the beginning of the file, without modification, 11327e51cbSPeter Avalos.\" this list of conditions, and the following disclaimer. 12327e51cbSPeter Avalos.\" 2. Redistributions in binary form must reproduce the above copyright 13327e51cbSPeter Avalos.\" notice, this list of conditions and the following disclaimer in the 14327e51cbSPeter Avalos.\" documentation and/or other materials provided with the distribution. 15327e51cbSPeter Avalos.\" 16327e51cbSPeter Avalos.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17327e51cbSPeter Avalos.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18327e51cbSPeter Avalos.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19327e51cbSPeter Avalos.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 20327e51cbSPeter Avalos.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21327e51cbSPeter Avalos.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22327e51cbSPeter Avalos.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23327e51cbSPeter Avalos.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24327e51cbSPeter Avalos.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25327e51cbSPeter Avalos.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26327e51cbSPeter Avalos.\" SUCH DAMAGE. 27327e51cbSPeter Avalos.\" 28*82c5fa3eSPeter Avalos.Dd December 16, 2014 29f72f8299SJan Lentfer.Dt LIBMAGIC 3 30327e51cbSPeter Avalos.Os 31327e51cbSPeter Avalos.Sh NAME 32327e51cbSPeter Avalos.Nm magic_open , 33327e51cbSPeter Avalos.Nm magic_close , 34327e51cbSPeter Avalos.Nm magic_error , 35e8af9738SPeter Avalos.Nm magic_errno , 36e4d4ce0cSPeter Avalos.Nm magic_descriptor , 37327e51cbSPeter Avalos.Nm magic_buffer , 38327e51cbSPeter Avalos.Nm magic_setflags , 39327e51cbSPeter Avalos.Nm magic_check , 40327e51cbSPeter Avalos.Nm magic_compile , 41e8af9738SPeter Avalos.Nm magic_list , 42e8af9738SPeter Avalos.Nm magic_load , 43*82c5fa3eSPeter Avalos.Nm magic_load_buffers , 44*82c5fa3eSPeter Avalos.Nm magic_setparam , 45*82c5fa3eSPeter Avalos.Nm magic_getparam , 46e8af9738SPeter Avalos.Nm magic_version 47a96e001bSPeter Avalos.Nd Magic number recognition library 48327e51cbSPeter Avalos.Sh LIBRARY 49327e51cbSPeter Avalos.Lb libmagic 50327e51cbSPeter Avalos.Sh SYNOPSIS 51327e51cbSPeter Avalos.In magic.h 52327e51cbSPeter Avalos.Ft magic_t 53327e51cbSPeter Avalos.Fn magic_open "int flags" 54327e51cbSPeter Avalos.Ft void 55327e51cbSPeter Avalos.Fn magic_close "magic_t cookie" 56327e51cbSPeter Avalos.Ft const char * 57327e51cbSPeter Avalos.Fn magic_error "magic_t cookie" 58327e51cbSPeter Avalos.Ft int 59327e51cbSPeter Avalos.Fn magic_errno "magic_t cookie" 60327e51cbSPeter Avalos.Ft const char * 619f86ab30SPeter Avalos.Fn magic_descriptor "magic_t cookie" "int fd" 62e4d4ce0cSPeter Avalos.Ft const char * 639f86ab30SPeter Avalos.Fn magic_file "magic_t cookie" "const char *filename" 64327e51cbSPeter Avalos.Ft const char * 65a96e001bSPeter Avalos.Fn magic_buffer "magic_t cookie" "const void *buffer" "size_t length" 66327e51cbSPeter Avalos.Ft int 67a96e001bSPeter Avalos.Fn magic_setflags "magic_t cookie" "int flags" 68327e51cbSPeter Avalos.Ft int 69a96e001bSPeter Avalos.Fn magic_check "magic_t cookie" "const char *filename" 70327e51cbSPeter Avalos.Ft int 71a96e001bSPeter Avalos.Fn magic_compile "magic_t cookie" "const char *filename" 72327e51cbSPeter Avalos.Ft int 739f86ab30SPeter Avalos.Fn magic_list "magic_t cookie" "const char *filename" 749f86ab30SPeter Avalos.Ft int 75a96e001bSPeter Avalos.Fn magic_load "magic_t cookie" "const char *filename" 76e8af9738SPeter Avalos.Ft int 77*82c5fa3eSPeter Avalos.Fn magic_load_buffers "magic_t cookie" "void **buffers" "size_t *sizes" "size_t nbuffers" 78*82c5fa3eSPeter Avalos.Ft int 79*82c5fa3eSPeter Avalos.Fn magic_getparam "magic_t cookie" "int param" "void *value" 80*82c5fa3eSPeter Avalos.Ft int 81*82c5fa3eSPeter Avalos.Fn magic_setparam "magic_t cookie" "int param" "const void *value" 82*82c5fa3eSPeter Avalos.Ft int 83e8af9738SPeter Avalos.Fn magic_version "void" 84327e51cbSPeter Avalos.Sh DESCRIPTION 85327e51cbSPeter AvalosThese functions 86327e51cbSPeter Avalosoperate on the magic database file 87327e51cbSPeter Avaloswhich is described 88327e51cbSPeter Avalosin 89327e51cbSPeter Avalos.Xr magic __FSECTION__ . 90327e51cbSPeter Avalos.Pp 91327e51cbSPeter AvalosThe function 92327e51cbSPeter Avalos.Fn magic_open 93a96e001bSPeter Avaloscreates a magic cookie pointer and returns it. 94a96e001bSPeter AvalosIt returns 95a96e001bSPeter Avalos.Dv NULL 96a96e001bSPeter Avalosif there was an error allocating the magic cookie. 97a96e001bSPeter AvalosThe 98327e51cbSPeter Avalos.Ar flags 99327e51cbSPeter Avalosargument specifies how the other magic functions should behave: 100327e51cbSPeter Avalos.Bl -tag -width MAGIC_COMPRESS 101327e51cbSPeter Avalos.It Dv MAGIC_NONE 102327e51cbSPeter AvalosNo special handling. 103327e51cbSPeter Avalos.It Dv MAGIC_DEBUG 104327e51cbSPeter AvalosPrint debugging messages to stderr. 105327e51cbSPeter Avalos.It Dv MAGIC_SYMLINK 106327e51cbSPeter AvalosIf the file queried is a symlink, follow it. 107327e51cbSPeter Avalos.It Dv MAGIC_COMPRESS 108327e51cbSPeter AvalosIf the file is compressed, unpack it and look at the contents. 109327e51cbSPeter Avalos.It Dv MAGIC_DEVICES 110327e51cbSPeter AvalosIf the file is a block or character special device, then open the device 111327e51cbSPeter Avalosand try to look in its contents. 112327e51cbSPeter Avalos.It Dv MAGIC_MIME_TYPE 113327e51cbSPeter AvalosReturn a MIME type string, instead of a textual description. 114327e51cbSPeter Avalos.It Dv MAGIC_MIME_ENCODING 115327e51cbSPeter AvalosReturn a MIME encoding, instead of a textual description. 116e4d4ce0cSPeter Avalos.It Dv MAGIC_MIME 117e4d4ce0cSPeter AvalosA shorthand for MAGIC_MIME_TYPE | MAGIC_MIME_ENCODING. 118327e51cbSPeter Avalos.It Dv MAGIC_CONTINUE 119327e51cbSPeter AvalosReturn all matches, not just the first. 120327e51cbSPeter Avalos.It Dv MAGIC_CHECK 121327e51cbSPeter AvalosCheck the magic database for consistency and print warnings to stderr. 122327e51cbSPeter Avalos.It Dv MAGIC_PRESERVE_ATIME 123327e51cbSPeter AvalosOn systems that support 124a96e001bSPeter Avalos.Xr utime 3 125327e51cbSPeter Avalosor 126327e51cbSPeter Avalos.Xr utimes 2 , 127e4d4ce0cSPeter Avalosattempt to preserve the access time of files analysed. 128327e51cbSPeter Avalos.It Dv MAGIC_RAW 129327e51cbSPeter AvalosDon't translate unprintable characters to a \eooo octal representation. 130327e51cbSPeter Avalos.It Dv MAGIC_ERROR 131327e51cbSPeter AvalosTreat operating system errors while trying to open files and follow symlinks 132327e51cbSPeter Avalosas real errors, instead of printing them in the magic buffer. 133e4d4ce0cSPeter Avalos.It Dv MAGIC_APPLE 134e4d4ce0cSPeter AvalosReturn the Apple creator and type. 135327e51cbSPeter Avalos.It Dv MAGIC_NO_CHECK_APPTYPE 136e4d4ce0cSPeter AvalosDon't check for 137327e51cbSPeter Avalos.Dv EMX 138327e51cbSPeter Avalosapplication type (only on EMX). 139e4d4ce0cSPeter Avalos.It Dv MAGIC_NO_CHECK_CDF 140e4d4ce0cSPeter AvalosDon't get extra information on MS Composite Document Files. 141327e51cbSPeter Avalos.It Dv MAGIC_NO_CHECK_COMPRESS 142e4d4ce0cSPeter AvalosDon't look inside compressed files. 143327e51cbSPeter Avalos.It Dv MAGIC_NO_CHECK_ELF 144e4d4ce0cSPeter AvalosDon't print ELF details. 1459f86ab30SPeter Avalos.It Dv MAGIC_NO_CHECK_ENCODING 146e4d4ce0cSPeter AvalosDon't check text encodings. 147327e51cbSPeter Avalos.It Dv MAGIC_NO_CHECK_SOFT 148327e51cbSPeter AvalosDon't consult magic files. 149327e51cbSPeter Avalos.It Dv MAGIC_NO_CHECK_TAR 150327e51cbSPeter AvalosDon't examine tar files. 151e4d4ce0cSPeter Avalos.It Dv MAGIC_NO_CHECK_TEXT 152e4d4ce0cSPeter AvalosDon't check for various types of text files. 153327e51cbSPeter Avalos.It Dv MAGIC_NO_CHECK_TOKENS 154327e51cbSPeter AvalosDon't look for known tokens inside ascii files. 155327e51cbSPeter Avalos.El 156327e51cbSPeter Avalos.Pp 157327e51cbSPeter AvalosThe 158327e51cbSPeter Avalos.Fn magic_close 159327e51cbSPeter Avalosfunction closes the 160327e51cbSPeter Avalos.Xr magic __FSECTION__ 161327e51cbSPeter Avalosdatabase and deallocates any resources used. 162327e51cbSPeter Avalos.Pp 163327e51cbSPeter AvalosThe 164327e51cbSPeter Avalos.Fn magic_error 165a96e001bSPeter Avalosfunction returns a textual explanation of the last error, or 166a96e001bSPeter Avalos.Dv NULL 167a96e001bSPeter Avalosif there was no error. 168327e51cbSPeter Avalos.Pp 169327e51cbSPeter AvalosThe 170327e51cbSPeter Avalos.Fn magic_errno 171327e51cbSPeter Avalosfunction returns the last operating system error number 172327e51cbSPeter Avalos.Pq Xr errno 2 173327e51cbSPeter Avalosthat was encountered by a system call. 174327e51cbSPeter Avalos.Pp 175327e51cbSPeter AvalosThe 176327e51cbSPeter Avalos.Fn magic_file 177327e51cbSPeter Avalosfunction returns a textual description of the contents of the 178327e51cbSPeter Avalos.Ar filename 179a96e001bSPeter Avalosargument, or 180a96e001bSPeter Avalos.Dv NULL 181a96e001bSPeter Avalosif an error occurred. 182327e51cbSPeter AvalosIf the 183327e51cbSPeter Avalos.Ar filename 184a96e001bSPeter Avalosis 185a96e001bSPeter Avalos.Dv NULL , 186a96e001bSPeter Avalosthen stdin is used. 187327e51cbSPeter Avalos.Pp 188327e51cbSPeter AvalosThe 189e4d4ce0cSPeter Avalos.Fn magic_descriptor 190e4d4ce0cSPeter Avalosfunction returns a textual description of the contents of the 191e4d4ce0cSPeter Avalos.Ar fd 192a96e001bSPeter Avalosargument, or 193a96e001bSPeter Avalos.Dv NULL 194a96e001bSPeter Avalosif an error occurred. 195e4d4ce0cSPeter Avalos.Pp 196e4d4ce0cSPeter AvalosThe 197327e51cbSPeter Avalos.Fn magic_buffer 198327e51cbSPeter Avalosfunction returns a textual description of the contents of the 199327e51cbSPeter Avalos.Ar buffer 200327e51cbSPeter Avalosargument with 201327e51cbSPeter Avalos.Ar length 202327e51cbSPeter Avalosbytes size. 203327e51cbSPeter Avalos.Pp 204327e51cbSPeter AvalosThe 205327e51cbSPeter Avalos.Fn magic_setflags 20679343712SPeter Avalosfunction sets the 207327e51cbSPeter Avalos.Ar flags 208a96e001bSPeter Avalosdescribed above. 209a96e001bSPeter AvalosNote that using both MIME flags together can also 210327e51cbSPeter Avalosreturn extra information on the charset. 211327e51cbSPeter Avalos.Pp 212327e51cbSPeter AvalosThe 213327e51cbSPeter Avalos.Fn magic_check 214327e51cbSPeter Avalosfunction can be used to check the validity of entries in the colon 215327e51cbSPeter Avalosseparated database files passed in as 216327e51cbSPeter Avalos.Ar filename , 217a96e001bSPeter Avalosor 218a96e001bSPeter Avalos.Dv NULL 219a96e001bSPeter Avalosfor the default database. 220a96e001bSPeter AvalosIt returns 0 on success and \-1 on failure. 221327e51cbSPeter Avalos.Pp 222327e51cbSPeter AvalosThe 223327e51cbSPeter Avalos.Fn magic_compile 224327e51cbSPeter Avalosfunction can be used to compile the the colon 225327e51cbSPeter Avalosseparated list of database files passed in as 226327e51cbSPeter Avalos.Ar filename , 227a96e001bSPeter Avalosor 228a96e001bSPeter Avalos.Dv NULL 229a96e001bSPeter Avalosfor the default database. 230a96e001bSPeter AvalosIt returns 0 on success and \-1 on failure. 231a96e001bSPeter AvalosThe compiled files created are named from the 232327e51cbSPeter Avalos.Xr basename 1 23379343712SPeter Avalosof each file argument with 23479343712SPeter Avalos.Dq .mgc 23579343712SPeter Avalosappended to it. 236327e51cbSPeter Avalos.Pp 237327e51cbSPeter AvalosThe 2389f86ab30SPeter Avalos.Fn magic_list 2399f86ab30SPeter Avalosfunction dumps all magic entries in a human readable format, 2409f86ab30SPeter Avalosdumping first the entries that are matched against binary files and then the 2419f86ab30SPeter Avalosones that match text files. 2429f86ab30SPeter AvalosIt takes and optional 2439f86ab30SPeter Avalos.Fa filename 2449f86ab30SPeter Avalosargument which is a colon separated list of database files, or 2459f86ab30SPeter Avalos.Dv NULL 2469f86ab30SPeter Avalosfor the default database. 2479f86ab30SPeter Avalos.Pp 2489f86ab30SPeter AvalosThe 249327e51cbSPeter Avalos.Fn magic_load 250327e51cbSPeter Avalosfunction must be used to load the the colon 251327e51cbSPeter Avalosseparated list of database files passed in as 252327e51cbSPeter Avalos.Ar filename , 253a96e001bSPeter Avalosor 254a96e001bSPeter Avalos.Dv NULL 255a96e001bSPeter Avalosfor the default database file before any magic queries can performed. 256327e51cbSPeter Avalos.Pp 257a96e001bSPeter AvalosThe default database file is named by the MAGIC environment variable. 258a96e001bSPeter AvalosIf that variable is not set, the default database file name is __MAGIC__. 259327e51cbSPeter Avalos.Fn magic_load 26079343712SPeter Avalosadds 26179343712SPeter Avalos.Dq .mgc 26279343712SPeter Avalosto the database filename as appropriate. 263e8af9738SPeter Avalos.Pp 264e8af9738SPeter AvalosThe 265*82c5fa3eSPeter Avalos.Fn magic_load_buffers 266*82c5fa3eSPeter Avalosfunction takes an array of size 267*82c5fa3eSPeter Avalos.Fa nbuffers 268*82c5fa3eSPeter Avalosof 269*82c5fa3eSPeter Avalos.Fa buffers 270*82c5fa3eSPeter Avaloswith a respective size for each in the array of 271*82c5fa3eSPeter Avalos.Fa sizes 272*82c5fa3eSPeter Avalosloaded with the contents of the magic databases from the filesystem. 273*82c5fa3eSPeter AvalosThis function can be used in environment where the magic library does 274*82c5fa3eSPeter Avalosnot have direct access to the filesystem, but can access the magic 275*82c5fa3eSPeter Avalosdatabase via shared memory or other IPC means. 276*82c5fa3eSPeter Avalos.Pp 277*82c5fa3eSPeter AvalosThe 278*82c5fa3eSPeter Avalos.Fn magic_getparam 279*82c5fa3eSPeter Avalosand 280*82c5fa3eSPeter Avalos.Fn magic_setparam 281*82c5fa3eSPeter Avalosallow getting and setting various limits related to the the magic 282*82c5fa3eSPeter Avaloslibrary. 283*82c5fa3eSPeter Avalos.Bl -column "MAGIC_PARAM_ELF_PHNUM_MAX" "size_t" "Default" -offset indent 284*82c5fa3eSPeter Avalos.It Sy "Parameter" Ta Sy "Type" Ta Sy "Default" 285*82c5fa3eSPeter Avalos.It Li MAGIC_PARAM_INDIR_MAX Ta size_t Ta 15 286*82c5fa3eSPeter Avalos.It Li MAGIC_PARAM_NAME_MAX Ta size_t Ta 30 287*82c5fa3eSPeter Avalos.It Li MAGIC_PARAM_ELF_NOTES_MAX Ta size_t Ta 256 288*82c5fa3eSPeter Avalos.It Li MAGIC_PARAM_ELF_PHNUM_MAX Ta size_t Ta 128 289*82c5fa3eSPeter Avalos.It Li MAGIC_PARAM_ELF_SHNUM_MAX Ta size_t Ta 32768 290*82c5fa3eSPeter Avalos.El 291*82c5fa3eSPeter Avalos.Pp 292*82c5fa3eSPeter AvalosThe 293*82c5fa3eSPeter Avalos.Dv MAGIC_PARAM_INDIR_RECURSION 294*82c5fa3eSPeter Avalosparameter controls how many levels of recursion will be followed for 295*82c5fa3eSPeter Avalosindirect magic entries. 296*82c5fa3eSPeter Avalos.Pp 297*82c5fa3eSPeter AvalosThe 298*82c5fa3eSPeter Avalos.Dv MAGIC_PARAM_NAME_RECURSION 299*82c5fa3eSPeter Avalosparameter controls how many levels of recursion will be followed for 300*82c5fa3eSPeter Avalosfor name/use calls. 301*82c5fa3eSPeter Avalos.Pp 302*82c5fa3eSPeter AvalosThe 303*82c5fa3eSPeter Avalos.Dv MAGIC_PARAM_NAME_MAX 304*82c5fa3eSPeter Avalosparameter controls the maximum number of calls for name/use. 305*82c5fa3eSPeter Avalos.Pp 306*82c5fa3eSPeter AvalosThe 307*82c5fa3eSPeter Avalos.Dv MAGIC_PARAM_NOTES_MAX 308*82c5fa3eSPeter Avalosparameter controls how many ELF notes will be processed. 309*82c5fa3eSPeter Avalos.Pp 310*82c5fa3eSPeter AvalosThe 311*82c5fa3eSPeter Avalos.Dv MAGIC_PARAM_PHNUM_MAX 312*82c5fa3eSPeter Avalosparameter controls how many ELF program sections will be processed. 313*82c5fa3eSPeter Avalos.Pp 314*82c5fa3eSPeter AvalosThe 315*82c5fa3eSPeter Avalos.Dv MAGIC_PARAM_SHNUM_MAX 316*82c5fa3eSPeter Avalosparameter controls how many ELF sections will be processed. 317*82c5fa3eSPeter Avalos.Pp 318*82c5fa3eSPeter AvalosThe 319e8af9738SPeter Avalos.Fn magic_version 320e8af9738SPeter Avaloscommand returns the version number of this library which is compiled into 321e8af9738SPeter Avalosthe shared library using the constant 322e8af9738SPeter Avalos.Dv MAGIC_VERSION 323e8af9738SPeter Avalosfrom 324e8af9738SPeter Avalos.In magic.h . 325e8af9738SPeter AvalosThis can be used by client programs to verify that the version they compile 326e8af9738SPeter Avalosagainst is the same as the version that they run against. 327327e51cbSPeter Avalos.Sh RETURN VALUES 328327e51cbSPeter AvalosThe function 329327e51cbSPeter Avalos.Fn magic_open 330a96e001bSPeter Avalosreturns a magic cookie on success and 331a96e001bSPeter Avalos.Dv NULL 332a96e001bSPeter Avaloson failure setting errno to an appropriate value. 333a96e001bSPeter AvalosIt will set errno to 334a96e001bSPeter Avalos.Er EINVAL 335a96e001bSPeter Avalosif an unsupported value for flags was given. 336327e51cbSPeter AvalosThe 3379f86ab30SPeter Avalos.Fn magic_list , 338327e51cbSPeter Avalos.Fn magic_load , 339327e51cbSPeter Avalos.Fn magic_compile , 340327e51cbSPeter Avalosand 341327e51cbSPeter Avalos.Fn magic_check 342a96e001bSPeter Avalosfunctions return 0 on success and \-1 on failure. 343327e51cbSPeter AvalosThe 3449f86ab30SPeter Avalos.Fn magic_buffer , 3459f86ab30SPeter Avalos.Fn magic_getpath , 346327e51cbSPeter Avalosand 3479f86ab30SPeter Avalos.Fn magic_file , 348a96e001bSPeter Avalosfunctions return a string on success and 349a96e001bSPeter Avalos.Dv NULL 350a96e001bSPeter Avaloson failure. 351a96e001bSPeter AvalosThe 352327e51cbSPeter Avalos.Fn magic_error 353327e51cbSPeter Avalosfunction returns a textual description of the errors of the above 354a96e001bSPeter Avalosfunctions, or 355a96e001bSPeter Avalos.Dv NULL 356a96e001bSPeter Avalosif there was no error. 357e8af9738SPeter AvalosThe 358e8af9738SPeter Avalos.Fn magic_version 359e8af9738SPeter Avalosalways returns the version number of the library. 360327e51cbSPeter AvalosFinally, 361327e51cbSPeter Avalos.Fn magic_setflags 362a96e001bSPeter Avalosreturns \-1 on systems that don't support 363a96e001bSPeter Avalos.Xr utime 3 , 364327e51cbSPeter Avalosor 365327e51cbSPeter Avalos.Xr utimes 2 366327e51cbSPeter Avaloswhen 367327e51cbSPeter Avalos.Dv MAGIC_PRESERVE_ATIME 368327e51cbSPeter Avalosis set. 369327e51cbSPeter Avalos.Sh FILES 37079343712SPeter Avalos.Bl -tag -width __MAGIC__.mgc -compact 371327e51cbSPeter Avalos.It Pa __MAGIC__ 372327e51cbSPeter AvalosThe non-compiled default magic database. 373327e51cbSPeter Avalos.It Pa __MAGIC__.mgc 374327e51cbSPeter AvalosThe compiled default magic database. 375327e51cbSPeter Avalos.El 376327e51cbSPeter Avalos.Sh SEE ALSO 377327e51cbSPeter Avalos.Xr file __CSECTION__ , 378327e51cbSPeter Avalos.Xr magic __FSECTION__ 379327e51cbSPeter Avalos.Sh AUTHORS 380a96e001bSPeter Avalos.An M\(oans Rullg\(oard 381a96e001bSPeter AvalosInitial libmagic implementation, and configuration. 382a96e001bSPeter Avalos.An Christos Zoulas 383a96e001bSPeter AvalosAPI cleanup, error code and allocation handling. 384