log_allowed: pass struct eventlog * instead of argv[] and envp[].

This lets us log based on the command_info[] list passed in from
the front-end.  Previously, much of the struct eventlog was constructed
from internal sudoers state instead.
This commit is contained in:
Todd C. Miller
2021-08-25 17:29:15 -06:00
parent e199dd8254
commit ec751c63eb
3 changed files with 17 additions and 28 deletions

View File

@@ -56,7 +56,7 @@ bool sudoers_setlocale(int locale_type, int *prev_locale);
int sudoers_getlocale(void);
int audit_failure(char *const argv[], char const *const fmt, ...) __printflike(2, 3);
int vaudit_failure(char *const argv[], char const *const fmt, va_list ap) __printflike(2, 0);
bool log_allowed(char *const argv[], char *const envp[]);
bool log_allowed(struct eventlog *evlog);
bool log_exit_status(int exit_status);
bool log_auth_failure(int status, unsigned int tries);
bool log_denial(int status, bool inform_user);