summaryrefslogtreecommitdiff
path: root/logsrvd
Commit message (Collapse)AuthorAgeFilesLines
...
* sudo_regex_compile_v1 stub: set errstr on errorTodd C. Miller2022-02-251-1/+3
|
* fuzz_logsrvd_conf: add stub version of sudo_regex_compile_v1().Todd C. Miller2022-02-252-2/+21
| | | | We want to fuzz our parser, not the libc regular expression code.
* iolog_seekto: initialize struct timing_closure before using.Todd C. Miller2022-02-231-0/+3
| | | | Coverity CID 249977
* iolog_rewrite: initialize struct timing_closure before using.Todd C. Miller2022-02-231-0/+3
| | | | Coverity CID 249971
* Do not disable fuzzer output if SUDO_FUZZ_VERBOSE env variable is set.Todd C. Miller2022-02-221-1/+2
|
* store_iobuf_local: fix potential double free on the error path.Todd C. Miller2022-02-101-2/+3
|
* Add missing default return in last commit.Todd C. Miller2022-02-031-0/+2
|
* sudo_logsrvd: make sure journal exists before writing the alert message.Todd C. Miller2022-02-031-1/+7
| | | | Fixes a potential NULL dereference when journaling an alert message.
* Work around a glibc regcomp() bug with repeated '+' operators.Todd C. Miller2022-02-011-0/+255
| | | | | Glibc regcomp() has a bug where it uses excessive memory for repeated '+' ops. Collapse them to avoid running the fuzzer out of memory.
* Rebase seed corpus on updated sudo_logsrvd.conf example.Todd C. Miller2022-02-016-20/+255
|
* Fix parsing of "retry_interval" in the relay section.Todd C. Miller2022-02-011-0/+17
| | | | | The setting was present but the callback was missing so it could not be parsed in the conf file.
* Use TIME_T_MAX as the upper limit when parsing timeouts.Todd C. Miller2022-02-011-9/+9
|
* Check for garbage after [section] in sudo_logsrvd.conf.Todd C. Miller2022-01-291-4/+11
|
* Sync fuzzing dictionary with current configuration keyword list.Todd C. Miller2022-01-291-0/+2
|
* Add new log_passwords and passprompt_regex settings.Todd C. Miller2022-01-283-17/+93
| | | | | | | | When logging terminal input, if log_passwords is false and any of the regular expressions in the passprompt_regex list are found in the terminal output, terminal input will be replaced with '*' characters until a newline or carriage return is found in the input or an output character is received.
* Avoid TOCTOU in sudo_mkdir_parents() using openat(2) and mkdirat(2).Todd C. Miller2021-12-111-2/+1
| | | | This also allows us to make path const as it should be.
* Add configure check for sha1sum and use "openssh dgst -sha1" if missing.Todd C. Miller2021-11-101-1/+2
| | | | Only needed when building the seed corpus zip files.
* Use iolog_openat() when opening the log.json file in the I/O log dir.Todd C. Miller2021-10-271-1/+1
|
* Use BIO_new_file() not BIO_new_fd() to read dhparams file.Todd C. Miller2021-10-261-8/+5
| | | | | Older versions of OpenSSL and wolfSSL lack BIO_new_fd(). Also explicitly include openssl/bio.h and openssl/dh.h for wolfSSL.
* Add support for WolfSSL's OpenSSL compatibility layer.Todd C. Miller2021-10-258-31/+26
| | | | Based on changes from Hayden Roche
* Move include of log_server.pb-c.h into logsrvd.h and sendlog.hTodd C. Miller2021-10-2511-9/+2
| | | | | This way there is no include file order issue with the PROTOBUF_C_VERSION_NUMBER check.
* Use SSL_FILETYPE_PEM with SSL_CTX_use_PrivateKey_file, not X509_FILETYPE_PEMTodd C. Miller2021-10-241-1/+1
| | | | | While they are defined to the same value in OpenSSL one should not rely on this.
* sudo_sendlog: send runenv, rungid and runuid from log.json tooTodd C. Miller2021-10-231-67/+130
| | | | | With this change, sudo_sendlog can now round-trip sudo-style I/O logs that use the newer log.json format without losing any information.
* Make sure INET_ADDRSTRLEN and INET6_ADDRSTRLEN are defined.Todd C. Miller2021-10-211-0/+7
|
* sudo_sendlog: send multiple I/O log records together if possibleTodd C. Miller2021-10-201-62/+88
| | | | | Try to fill the write buffer and then send to the server instead of sending records one at a time.
* sudo_sendlog: support multiple write buffers like sudo_logsrvdTodd C. Miller2021-10-202-45/+90
|
* Fix potential use-after-free when calling iolog_flush_all().Todd C. Miller2021-10-191-4/+4
| | | | | | We need to call iolog_flush_all() _before_ scheduling the commit point. If we fail to schedule to commit point, the closure will be freed. Coverity CID 220557
* sendlog: use runargv from log.json if availableTodd C. Miller2021-10-191-6/+54
|
* sudo_sendlog: send exit data in eventlog if presentTodd C. Miller2021-10-191-9/+24
|
* No longer need to pass exit params to eventlog_exit(), use struct eventlog.Todd C. Miller2021-10-191-23/+23
| | | | | Now that struct eventlog includes the exit parameters we can simplify how eventlog_exit() is called.
* Read command run_time, signal and exit_value from I/O log log.json file.Todd C. Miller2021-10-191-0/+1
|
* Log the command run-time and exit status in the I/O log.Todd C. Miller2021-10-191-0/+104
|
* Handle a missing run_time in an ExitMessage.Todd C. Miller2021-10-181-4/+8
| | | | It is now possible to pass a NULL run_time to eventlog_exit().
* No need to flush logs before commit point if we flush after each write.Todd C. Miller2021-10-161-1/+4
| | | | | Also document that logs are flushed before sending a commit point even when flushing is disabled.
* Flush I/O logs before we send a commit point.Todd C. Miller2021-10-153-1/+22
| | | | | | The commit point message means we have written the data to disk so we should not be buffering it any longer. We do not currently fsync(2) the data after flushing, perhaps we should.
* Do not treat a resume point of [0, 0] as an error.Todd C. Miller2021-10-151-1/+18
| | | | | | If the connecton is interrupted before sudo sends back a commit_point message, resuming at [0, 0] is correct. Also add a warning on unexpected EOF parsing the timing file.
* regenerate dependenciesTodd C. Miller2021-10-101-2/+4
|
* Use a consistent version of fuzz_conversation() with all fuzzers.Todd C. Miller2021-09-281-0/+19
| | | | Also undo a change to fuzz_sudoers.c that snuck in to the last commit.
* Fuzzers should not produce output.Todd C. Miller2021-09-281-0/+12
| | | | Excessive output makes the fuzzer runs much less efficient.
* expand_buf: fix conditional for when we need to preserve existing dataTodd C. Miller2021-09-281-2/+4
| | | | | | | It is possible for the buffer offset to be zero when the length is non-zero. The proper value to use is the same as is used for the memcpy/memmove size. Fixes buffer corruption caused by a very long command line that usually results in a dropped connection.
* Reuse existing journal file for an accepted/rejected sub-command.Todd C. Miller2021-09-201-2/+9
| | | | | | Otherwise we end up with zero-length files in the incoming queue dir and may end up relaying one of those instead of the actual journal file.
* sudo_logsrvd: only send log ID for first command of a sessionTodd C. Miller2021-09-201-2/+3
| | | | There is no need to send the log ID for each sub-command.
* tls_init.c: use SSL_CTX_set0_tmp_dh_pkey if present.Todd C. Miller2021-09-171-21/+84
| | | | | Fixes a warning on OpenSSL 3.0 and plugs a memory leak of dhparams on config reload.
* sudo_debug_register: add minfd argument to specify lowest fd numberTodd C. Miller2021-08-262-3/+3
| | | | | Use this in sudo_intercept.so to avoid allocating a low-numbered fd which the shell reserves for use by scripts.
* Replace messages like "unknown foo: %s" with "unknown foo %s".Todd C. Miller2021-08-191-3/+3
| | | | | The colon really doesn't belong there; we generally use a colon to separate a message from the warning detail.
* Sync warning messages with sudoers/logging.cTodd C. Miller2021-08-191-3/+3
| | | | Avoids 3 translation strings that were effectively duplicated.
* Print the section when warning about an illegal key in the conf file.Todd C. Miller2021-08-161-1/+2
| | | | | This should make it easier to tell when a setting is present in the wrong section.
* Set umask to be less restrictive before creating parent directories.Todd C. Miller2021-08-144-6/+38
| | | | | Otherwise we could end up creating them with a more restrictive mode than indended. Coverity CID 221592
* store_alert_local: fix memory leak on error pathTodd C. Miller2021-08-141-8/+11
| | | | Coverity CID 238642
* store_accept_local: fix return value on errorTodd C. Miller2021-08-141-1/+1
|