summaryrefslogtreecommitdiff
path: root/usr.bin/file
AgeCommit message (Collapse)Author
2016-08-26Pull in <time.h> for ctime_r, gmtime, etcPhilip Guenther
ok deraadt@
2016-06-12Remove old unused prototype, from Ilya Kaliman.Nicholas Marriott
2016-05-01Tidy up some #include lines.Nicholas Marriott
2016-05-01Exact match use and name with strcmp rather than prefix with strncmp.Nicholas Marriott
2016-05-01Use the right size (include the length byte) when working out if aNicholas Marriott
pstring is too big.
2016-05-01Add support for 'name' and 'use' which allows more of the latest magicNicholas Marriott
files to work unchanged. (We are still missing 'indirect' and a few other bits.)
2016-05-01Trim = prefix from regex (it a noop).Nicholas Marriott
2016-05-01Remove __unused that are now lies.Nicholas Marriott
2016-05-01Add support for 'clear' test, and fix 'default' to expand the resultNicholas Marriott
string if any (used by, for example, rtf).
2016-04-30magic_test_type_default parameter is no longer __unused.Nicholas Marriott
2016-04-30Fix the default type to work properly, that is to only match if noNicholas Marriott
previous test at the same level has matched.
2016-04-30Replace regex match string in results (some new magic entries use this).Nicholas Marriott
2016-04-28Partially sync magdir/sniffer from the file distribution on astron.com,Stuart Henderson
adds pcap-ng files and some more link-layer types for pcap. Not an exact merge because they're using "use" which we don't currently support. ok nicm@ jasper@
2016-04-24typos;Jason McIntyre
2016-03-06Sync 'archive' magic from file 5.25. Various improvements includingStuart Henderson
epub detection which jirib at devio dot us reported as not working. nicm says "The only thing I see that we do not support is the indirect on the last line, I suggest just commenting it" (done).
2016-03-04fix broken listDmitrij Czarkoff
2016-03-04fix typoDmitrij Czarkoff
2016-02-20Fix the C type used for 32-bit float/lefloat/befloat, it should be floatNicholas Marriott
not double (they are not used in any magic files anyway at the moment though). Spotted by and ok jsg.
2016-01-29Therefor -> Therefore (where appropriate)tb
from ray@, ok jmc@
2016-01-02Sync magdir/animation with file 5.25, amongst other updates this fixes anStuart Henderson
incorrect detection of mp3 sample frequency/audio channels with non-mp3 files tracked down by Brandon Vincent. ok nicm@
2015-12-24Add --brief and --dereference, used by xdg-open/xdg-mime.Jeremie Courreges-Anglas
From Ralf Horstmann, ok tb@ deraadt@ nicm@ sthen@
2015-12-05EAGAIN handling for imsg_read. OK henning@ benno@Claudio Jeker
2015-11-17Merge xmalloc.[ch] files across base, skipping OpenSSH for now.Tobias Stoeckmann
ok nicm
2015-11-15When validating a char by calling strchr() with a string of allowed chars,Tobias Stoeckmann
check for '\0' first, because strchr() would return non-NULL. ok nicm
2015-11-13Break the message preparation bit of the main loop into its own functionNicholas Marriott
for less excessive level of indentation.
2015-11-13Call stat not lstat with -L, makes links actually be followed. ReportedNicholas Marriott
by and ok semarie@.
2015-11-05palmpilot should have gone when palm was added, it is redundant.Nicholas Marriott
2015-10-31Update Matroska magic file.Nicholas Marriott
2015-10-17The file(1) magic-parsing process was using pledge "stdio getpw proc recvfd"Theo de Raadt
early on, then a set of getpwnam/setresuid/... before quickly dropping to "stdio recvfd". It receives fd's and runs the magic code on them in a chroot'd "stdio" jail. We can do better than that. Before the recent change, "proc" contained both the concepts of "forking" and "setuid". "id" is now split out as a seperate request, and it is exactly what this process needs momentarily. So this loses another window of opportunity, in case we have a major bug in .... hmm, it'd have to be in getpwnam.... ok tedu doug semarie gilles
2015-10-09Change all tame callers to namechange to pledge(2).Theo de Raadt
2015-10-06Move from tame "cmsg" to tame "sendfd" or "recvfd", depending on whichTheo de Raadt
way the process moves fd's.
2015-10-06Simple update for pdf, from file 5.x.Nicholas Marriott
2015-10-06Another simple update for xwindows, from 5.x.Nicholas Marriott
2015-10-06Log the matched offset (and the new offset) instead of just of the newNicholas Marriott
offset (as if it was where the match was found).
2015-10-06ssh and ssl key file magic, from file 5.x.Nicholas Marriott
2015-10-06Another simple update from file 5.x.Nicholas Marriott
2015-10-05Another trivial update, some extra bits for timezone, from file 5.x.Nicholas Marriott
2015-10-05Very trivial changes from file 5.x: spelling mistakes, %ld->%d and someNicholas Marriott
style nits.
2015-10-05Get BE and LE UTF-32 correct, from file 5.x.Nicholas Marriott
2015-10-05Update compress magic from the upstream file 5.x magic files.Nicholas Marriott
2015-10-05Add support for !:strength modifier to adjust strength of a test.Nicholas Marriott
2015-10-05Offset into the file can be size_t and add some casts to remove warnings.Nicholas Marriott
2015-10-05use the normal -1 check for tame failureTheo de Raadt
2015-10-04Add tame(2) to file(1) and drop the old systrace(4) sandbox. tame(2) isNicholas Marriott
only applied to the child process, which requires the parent to not pass directory file descriptors (tame("cmsg") does not allow it). Because file(1) is already privsep, the permissions in the child can be quickly restricted: first to "stdio cmsg getpw proc" then after the privdrop to "stdio cmsg".
2015-10-02use limits.h instead of sys/param.h to get PATH_MAXTheo de Raadt
2015-08-23Need to permit kbind in this sandbox tooPhilip Guenther
2015-08-12Support + and - for dates.Nicholas Marriott
2015-08-12Fix adjustment of the offset when string, pstring or search match.Nicholas Marriott
2015-08-12Add string/Ww as aliases for string/Bb, and ignore t. (The latestNicholas Marriott
version of the original file replaced Bb with Ww and then reused b for something else (!), but alias them instead.)
2015-08-11Only warn about [bl]estring16 when they are used, like the otherNicholas Marriott
unsupported types.