Todd C. Miller
3e21c8da5c
Add missing PVS Studio Open Source comments.
...
Also avoid checking protobuf-c source and protobuf-c generated files.
2022-06-29 09:45:04 -06:00
Todd C. Miller
e5834bd405
Use #include <config.h> not #include "config.h" for consistency.
...
Otherwise, some compilers may do the wrong thing in a build
dir if there is a config.h file in the source dir too.
2022-06-29 08:47:16 -06:00
Todd C. Miller
13672f28df
Make sudo pass -Wwrite-strings
2022-06-28 16:33:15 -06:00
Todd C. Miller
3c1ce4bf72
store_iobuf_local: fix potential double free on the error path.
2022-02-10 13:33:24 -07:00
Todd C. Miller
9b93961b3e
Add new log_passwords and passprompt_regex settings.
...
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.
2022-01-28 08:52:42 -07:00
Todd C. Miller
7c4c61be0f
Use iolog_openat() when opening the log.json file in the I/O log dir.
2021-10-27 07:45:22 -06:00
Todd C. Miller
87c1dd9d7d
Move include of log_server.pb-c.h into logsrvd.h and sendlog.h
...
This way there is no include file order issue with the
PROTOBUF_C_VERSION_NUMBER check.
2021-10-25 12:25:24 -06:00
Todd C. Miller
bddf03fe45
No longer need to pass exit params to eventlog_exit(), use struct eventlog.
...
Now that struct eventlog includes the exit parameters we can simplify
how eventlog_exit() is called.
2021-10-19 08:58:34 -06:00
Todd C. Miller
d21c935a15
Log the command run-time and exit status in the I/O log.
2021-10-19 08:50:02 -06:00
Todd C. Miller
77c339858d
Handle a missing run_time in an ExitMessage.
...
It is now possible to pass a NULL run_time to eventlog_exit().
2021-10-18 15:34:48 -06:00
Todd C. Miller
8cc7e4bb5e
sudo_logsrvd: only send log ID for first command of a session
...
There is no need to send the log ID for each sub-command.
2021-09-20 07:57:31 -06:00
Todd C. Miller
6d3cf0ffda
store_alert_local: fix memory leak on error path
...
Coverity CID 238642
2021-08-14 09:18:55 -06:00
Todd C. Miller
4add9c2c00
store_accept_local: fix return value on error
2021-08-14 08:47:44 -06:00
Todd C. Miller
4aefd43948
For intercepted commands, log an offset into the current I/O log.
...
This can be used with sudoreplay to jump to when a specific command
was executed within a session log.
2021-08-13 16:00:00 -06:00
Todd C. Miller
064981fb14
Don't overwrite closure->evlog for sub-commands.
2021-08-13 15:59:59 -06:00
Todd C. Miller
c234bab7b2
Remove unused info_cb and info arguments from eventlog_exit()
2021-07-15 11:07:25 -06:00
Todd C. Miller
0dd2b6442a
Add log_exit setting in the sudo_logsrvd.conf eventlog stanza
...
This causes sudo_logsrvd to log a record with the exit status or
terminating signal in response to an ExitMessage.
2021-07-09 11:08:44 -06:00
Todd C. Miller
1d41937ca1
Silence a compiler warning on Solaris.
2021-06-15 14:59:59 -06:00
Todd C. Miller
5a3bbba12b
Use sudo_warnx?() instead of sudo_debug_printf for errors.
...
We now hook the warn functions so the messages are logged.
The messages still show up in the debug log too.
2021-06-15 13:58:12 -06:00
Todd C. Miller
0f5c8fe121
Remove line causing store_suspend_local() to return false on success.
...
This is something that should have been removed as part of the local
I/O logging refactor.
2021-05-10 13:44:31 -06:00
Todd C. Miller
c3534712de
Fix I/O log restart of locally-store logs.
...
This got broken a while ago when evlog in struct connection_closure
was changed to a pointer.
2021-05-03 16:54:25 -06:00
Todd C. Miller
84a01d3a93
Move local iolog log functions to logsrvd_local.c
2021-04-27 14:46:27 -06:00