Age | Commit message (Collapse) | Author | |
---|---|---|---|
2024-01-16 | Use imsg_get_fd() and adjust cleanup code accordingly. | Claudio Jeker | |
OK nicm@ | |||
2022-12-26 | spelling fixes; from paul tagliamonte | Jason McIntyre | |
amendments to his diff are noted on tech | |||
2021-04-28 | Add RISC-V elf executable detection. | Dale Rahn | |
looks good jsg@ | |||
2021-01-23 | recognize those ubiquitous webp file | Marc Espie | |
cherry-picked from FreeBSD okay millert@, deraadt@, sthen@ | |||
2020-11-14 | remove macro instances from arbitrary string width specifiers. for example | Jason McIntyre | |
-width ".Dv BOB" -> -width "BOB" although they are not errors, they are misleading and probably should not get pasted around | |||
2019-11-30 | After fork(2) the pledge(2) in the parent proc can be reduced to | Ricardo Mestre | |
"stdio rpath sendfd" so that it can call {l,}stat/open and sendfd for imsg_* in order to send fds to the child proc which is already pledged by recvfd to receive them OK brynet@ deraadt@ | |||
2019-06-28 | asprintf returns -1, not an arbitrary value < 0. Also upon error the | Theo de Raadt | |
(very sloppy specification) leaves an undefined value in *ret, so it is wrong to inspect it, the error condition is enough. discussed a little with nicm, and then much more with millert until we were exasperated | |||
2019-02-05 | dev_t is signed to permit passing -1 as an invalid condition, but the | Theo de Raadt | |
decomposition into major and minor is unsigned, so we should print them with %u instead of %d. ok guenther | |||
2019-01-15 | Regex flags should include REG_NEWLINE and REG_ICASE should actually be | Nicholas Marriott | |
used if specified. | |||
2019-01-06 | the parent process doesn't do much but open files, but just the same | Ted Unangst | |
there's no reason it can't use pledge to enforce that. ok brynet deraadt | |||
2018-10-04 | Update qcow file definitions | ccardenas | |
Taken from netbsd "go for it" deraadt@ | |||
2018-06-14 | Return from magic_test does not need to be copied because the caller | Nicholas Marriott | |
will do so anyway and it was just being leaked. ok brynet deraadt | |||
2018-01-15 | Revert my changes in r1.60 back to nicm@'s latest for now. | Bryan Steele | |
Fixes "file *|grep" breakage reported by espie@ ok nicm, deraadt | |||
2017-11-30 | Default unknowns to application/octet-stream instead of x-not-regular-file. | Anthony J. Bentley | |
This makes more sense and matches what the latest "other" file(1) now does. ok nicm@ | |||
2017-09-20 | add missing types; from klemens nanni | Jason McIntyre | |
ok nicm | |||
2017-07-02 | Replace fgetln with POSIX getline, even though file was using fgetln in | Bryan Steele | |
the idiomatic safe way. Also, check for stream errors with ferror and err(1, "") in that case. with feedback from joerg@, schwarze@, nicm@ ok nicm "code is shorter anyway", and joerg@ for an earlier diff | |||
2017-07-01 | close open fd after testing files, ensuring that fd isn't stdin. | Bryan Steele | |
ok nicm@ | |||
2017-07-01 | magicfp is fclosed where it was opened, remove fclose from magic_load() | Bryan Steele | |
ok nicm deraadt | |||
2017-06-28 | Fix stdin file read support, accidentally broken in my last commit. | Bryan Steele | |
2017-06-28 | remove excess #include | Theo de Raadt | |
2017-06-28 | perform an initial pledge very early on, and drop tzset to later. | Theo de Raadt | |
ok nicm brynet | |||
2017-06-28 | Simplify file(1) by removing the no longer necessary parent/child separation | Bryan Steele | |
and just drop privileges in the main process. Also allows for a tighter "stdio" pledge. passing regress tests still pass ok nicm@ with helpful feedback | |||
2017-04-18 | Style nits; no binary change. | Nicholas Marriott | |
2017-02-19 | Recognise AArch64 binaries and core dumps. | Jonathan Gray | |
2016-08-26 | Pull in <time.h> for ctime_r, gmtime, etc | Philip Guenther | |
ok deraadt@ | |||
2016-06-12 | Remove old unused prototype, from Ilya Kaliman. | Nicholas Marriott | |
2016-05-01 | Tidy up some #include lines. | Nicholas Marriott | |
2016-05-01 | Exact match use and name with strcmp rather than prefix with strncmp. | Nicholas Marriott | |
2016-05-01 | Use the right size (include the length byte) when working out if a | Nicholas Marriott | |
pstring is too big. | |||
2016-05-01 | Add support for 'name' and 'use' which allows more of the latest magic | Nicholas Marriott | |
files to work unchanged. (We are still missing 'indirect' and a few other bits.) | |||
2016-05-01 | Trim = prefix from regex (it a noop). | Nicholas Marriott | |
2016-05-01 | Remove __unused that are now lies. | Nicholas Marriott | |
2016-05-01 | Add support for 'clear' test, and fix 'default' to expand the result | Nicholas Marriott | |
string if any (used by, for example, rtf). | |||
2016-04-30 | magic_test_type_default parameter is no longer __unused. | Nicholas Marriott | |
2016-04-30 | Fix the default type to work properly, that is to only match if no | Nicholas Marriott | |
previous test at the same level has matched. | |||
2016-04-30 | Replace regex match string in results (some new magic entries use this). | Nicholas Marriott | |
2016-04-28 | Partially 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-24 | typos; | Jason McIntyre | |
2016-03-06 | Sync 'archive' magic from file 5.25. Various improvements including | Stuart 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-04 | fix broken list | Dmitrij Czarkoff | |
2016-03-04 | fix typo | Dmitrij Czarkoff | |
2016-02-20 | Fix the C type used for 32-bit float/lefloat/befloat, it should be float | Nicholas Marriott | |
not double (they are not used in any magic files anyway at the moment though). Spotted by and ok jsg. | |||
2016-01-29 | Therefor -> Therefore (where appropriate) | tb | |
from ray@, ok jmc@ | |||
2016-01-02 | Sync magdir/animation with file 5.25, amongst other updates this fixes an | Stuart Henderson | |
incorrect detection of mp3 sample frequency/audio channels with non-mp3 files tracked down by Brandon Vincent. ok nicm@ | |||
2015-12-24 | Add --brief and --dereference, used by xdg-open/xdg-mime. | Jeremie Courreges-Anglas | |
From Ralf Horstmann, ok tb@ deraadt@ nicm@ sthen@ | |||
2015-12-05 | EAGAIN handling for imsg_read. OK henning@ benno@ | Claudio Jeker | |
2015-11-17 | Merge xmalloc.[ch] files across base, skipping OpenSSH for now. | Tobias Stoeckmann | |
ok nicm | |||
2015-11-15 | When 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-13 | Break the message preparation bit of the main loop into its own function | Nicholas Marriott | |
for less excessive level of indentation. | |||
2015-11-13 | Call stat not lstat with -L, makes links actually be followed. Reported | Nicholas Marriott | |
by and ok semarie@. |