summary refs log tree commit diff
path: root/log.c
AgeCommit message (Collapse)Author
2022-04-20Sanitize leading dots from log path componentsJune McEnroe
Prevent directory traversal by sanitizing leading dots as well as slashes from log path components, which can be controlled by the server. Side effect of preventing hidden dotfiles is a bonus, I think. Also check that the full path actually fits in the buffer. Reported-by: Samanta Navarro <ferivoz@riseup.net>
2021-10-16Import refactored xdg.c from pounceC. McEnroe
2021-07-13FreeBSD: Avoid caph_stream_rights(3)C. McEnroe
caph_stream_rights(3) doesn't exist before FreeBSD 13.0 and there's no good reason to create that dependency. I still run servers on FreeBSD 12. This is a partial revert of cbc9545cb3f76733030c867f32ddb6a922cd2907.
2021-06-28FreeBSD: Use capsicum_helpers.hC. McEnroe
2021-06-25FreeBSD: Limit rights on log directoryC. McEnroe
2021-06-25Keep log directory open, use mkdirat(2) and openat(2)C. McEnroe
2021-06-21Open log files with CLOEXECC. McEnroe
2021-01-10Check fprintf return values rather than ferrorC. McEnroe
2020-08-04Say "OpenSSL" in additional permission noticesC. McEnroe
LibreSSL is "a modified version of that library".
2020-06-08Add additional permission for linking with LibreSSLC. McEnroe
https://www.gnu.org/licenses/gpl-faq.en.html#GPLIncompatibleLibs
2020-03-25Add logging functionsC. McEnroe
The mkdir dance is a bit awkward...
2020-02-11Remove legacy codeC. McEnroe
2019-07-27Make copyright headers consistentCurtis McEnroe
2019-02-25Add M-l to list the logCurtis McEnroe
2019-01-25Use getline in place of fgetlnCurtis McEnroe
2018-11-30Measure length of log timestamp more consistentlyCurtis McEnroe
2018-11-29Strip timestamps from log replayCurtis McEnroe
Also fix string length. %.*s does not behave as one might expect when writing wchar_t.
2018-11-29Add basic log replayCurtis McEnroe
2018-09-02Use PascalCase for constantsCurtis McEnroe
Begone underscores.
2018-08-18Do not set log files executableCurtis McEnroe
Oops.
2018-08-17Add loggingCurtis McEnroe
The reason logFmt takes a timestamp as a parameter is to support IRCv3 server-time in the future to accurately log the znc buffer. Hopefully.