Commit Graph

10 Commits

Author SHA1 Message Date
Todd C. Miller
376ad5e6b4 Do not add an unfinished write buffer to the queue if it is already present.
In client_msg_cb() we only remove a buffer from the queue when it is
finished.  Inserting the buf again can cause a cycle in the queue.
2021-01-21 12:46:48 -07:00
Todd C. Miller
eb536d8b7c Fix problem when SSL_read() returns SSL_ERROR_WANT_WRITE. This can
happen when the socket cannot be written to immediately.
We need to set the read_instead_of_write flag in that case, _not_
write_instead_of_read.  Also sync comments with sendlog.c.
Bug #954
2021-01-20 11:25:23 -07:00
Todd C. Miller
67e6e2085a Reduce the number of error messages when we can't connect to the audit server.
Add the error string to "unable to connect to log server" instead of
using an extra error message for the connect(2) failure.
2020-12-03 13:20:18 -07:00
Todd C. Miller
a19f242796 Use correct error message when the TLS connection is dropped.
Was: "recv: Unknown error 0", now: "lost connection to log server".
2020-12-03 11:42:20 -07:00
Todd C. Miller
cb87253d1e It is possible for evlog->argv or evlog->envp to be NULL. 2020-11-17 13:43:31 -07:00
Todd C. Miller
72df19088b Refactor code to format the client message after the hello. 2020-11-09 18:32:37 -07:00
Todd C. Miller
9779009fae Add info_msgs to AlertMessage and populate it.
This lets us log eventlog info along with the alert if it is available.
2020-11-09 17:15:11 -07:00
Todd C. Miller
62525dcc94 Log reject and alert messages to the log server if one is defined. 2020-11-09 17:15:02 -07:00
Todd C. Miller
e56c3b342b Rename iolog_plugin.h to log_client.h.
It is no longer I/O log specific and is used by sudoers_audit too.
2020-11-09 17:13:04 -07:00
Todd C. Miller
62547746d3 Rename iolog_client -> log_client.
The logsrvd client code is now used for more than just I/O logging.
2020-11-09 17:13:04 -07:00