version 1.1.1.3, 2013/07/22 10:46:12
|
version 1.1.1.4, 2013/10/14 07:56:34
|
Line 30
|
Line 30
|
#include <errno.h> |
#include <errno.h> |
#include <unistd.h> |
#include <unistd.h> |
|
|
|
#include "missing.h" |
|
#include "fatal.h" |
#include "gettext.h" |
#include "gettext.h" |
#include "error.h" |
|
#include "sudo_debug.h" |
#include "sudo_debug.h" |
#include "bsm_audit.h" |
#include "bsm_audit.h" |
|
|
Line 125 bsm_audit_success(char **exec_args)
|
Line 126 bsm_audit_success(char **exec_args)
|
if (tok == NULL) |
if (tok == NULL) |
fatal("au_to_return32"); |
fatal("au_to_return32"); |
au_write(aufd, tok); |
au_write(aufd, tok); |
|
#ifdef __sun |
|
if (au_close(aufd, 1, AUE_sudo, 0) == -1) |
|
#else |
if (au_close(aufd, 1, AUE_sudo) == -1) |
if (au_close(aufd, 1, AUE_sudo) == -1) |
|
#endif |
fatal(_("unable to commit audit record")); |
fatal(_("unable to commit audit record")); |
debug_return; |
debug_return; |
} |
} |
Line 147 bsm_audit_failure(char **exec_args, char const *const
|
Line 152 bsm_audit_failure(char **exec_args, char const *const
|
/* |
/* |
* If we are not auditing, don't cut an audit record; just return. |
* 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) |
if (errno == AUDIT_NOT_CONFIGURED) |
debug_return; |
debug_return; |
fatal(_("Could not determine audit condition")); |
fatal(_("Could not determine audit condition")); |
Line 186 bsm_audit_failure(char **exec_args, char const *const
|
Line 191 bsm_audit_failure(char **exec_args, char const *const
|
if (tok == NULL) |
if (tok == NULL) |
fatal("au_to_return32"); |
fatal("au_to_return32"); |
au_write(aufd, tok); |
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) |
if (au_close(aufd, 1, AUE_sudo) == -1) |
|
#endif |
fatal(_("unable to commit audit record")); |
fatal(_("unable to commit audit record")); |
debug_return; |
debug_return; |
} |
} |