mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
Fix compilation on Solaris 11.
This commit is contained in:
@@ -126,7 +126,11 @@ bsm_audit_success(char **exec_args)
|
||||
if (tok == NULL)
|
||||
fatal("au_to_return32");
|
||||
au_write(aufd, tok);
|
||||
#ifdef __sun
|
||||
if (au_close(aufd, 1, AUE_sudo, 0) == -1)
|
||||
#else
|
||||
if (au_close(aufd, 1, AUE_sudo) == -1)
|
||||
#endif
|
||||
fatal(_("unable to commit audit record"));
|
||||
debug_return;
|
||||
}
|
||||
@@ -148,7 +152,7 @@ bsm_audit_failure(char **exec_args, char const *const fmt, va_list ap)
|
||||
/*
|
||||
* If we are not auditing, don't cut an audit record; just return.
|
||||
*/
|
||||
if (auditon(A_GETCOND, &au_cond, sizeof(long)) < 0) {
|
||||
if (auditon(A_GETCOND, (caddr_t)&au_cond, sizeof(long)) < 0) {
|
||||
if (errno == AUDIT_NOT_CONFIGURED)
|
||||
debug_return;
|
||||
fatal(_("Could not determine audit condition"));
|
||||
@@ -187,7 +191,11 @@ bsm_audit_failure(char **exec_args, char const *const fmt, va_list ap)
|
||||
if (tok == NULL)
|
||||
fatal("au_to_return32");
|
||||
au_write(aufd, tok);
|
||||
#ifdef __sun
|
||||
if (au_close(aufd, 1, AUE_sudo, PAD_FAILURE) == -1)
|
||||
#else
|
||||
if (au_close(aufd, 1, AUE_sudo) == -1)
|
||||
#endif
|
||||
fatal(_("unable to commit audit record"));
|
||||
debug_return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user