2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 22:35:10 +00:00

Defer logging of the successful command until approval plugins have run.

This adds audit plugin support to the sudoers module, currently
only used for accept events.  As a result, the sudoers file is now
initially parsed as an audit plugin.
This commit is contained in:
Todd C. Miller
2020-06-02 09:07:46 -06:00
parent f0dc48548c
commit b519481912
11 changed files with 161 additions and 95 deletions

View File

@@ -70,8 +70,7 @@ union sudo_defs_val;
bool sudoers_warn_setlocale(bool restore, int *cookie);
bool sudoers_setlocale(int newlocale, int *prevlocale);
int sudoers_getlocale(void);
int audit_success(int argc, char *argv[]);
int audit_failure(int argc, char *argv[], char const *const fmt, ...) __printflike(3, 4);
int audit_failure(char *const argv[], char const *const fmt, ...) __printflike(2, 3);
bool log_allowed(int status);
bool log_auth_failure(int status, unsigned int tries);
bool log_denial(int status, bool inform_user);