From 9da20adb5981fd1bcee5a30111e2cfdd912dfcfa Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 9 Feb 2023 11:09:24 -0700 Subject: Add eventlog_mail() to send a log message via mail. This is used by mail_parse_errors() to send multi-line messages. Previously, the newlines would be escaped as control characters. --- include/sudo_eventlog.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/sudo_eventlog.h b/include/sudo_eventlog.h index 55feee5d2..0e30ec495 100644 --- a/include/sudo_eventlog.h +++ b/include/sudo_eventlog.h @@ -133,6 +133,7 @@ typedef bool (*eventlog_json_callback_t)(struct json_container *, void *); bool eventlog_accept(const struct eventlog *evlog, int flags, eventlog_json_callback_t info_cb, void *info); bool eventlog_exit(const struct eventlog *evlog, int flags); bool eventlog_alert(const struct eventlog *evlog, int flags, struct timespec *alert_time, const char *reason, const char *errstr); +bool eventlog_mail(const struct eventlog *evlog, int flags, struct timespec *event_time, const char *reason, const char *errstr, char * const extra[]); bool eventlog_reject(const struct eventlog *evlog, int flags, const char *reason, eventlog_json_callback_t info_cb, void *info); bool eventlog_store_json(struct json_container *jsonc, const struct eventlog *evlog); bool eventlog_store_sudo(int event_type, const struct eventlog *evlog, struct sudo_lbuf *lbuf); -- cgit v1.2.1