mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Pass int arguments to auditon(2)'s A_GETCOND API rather than long
arguments. This change should be MFC'd with OpenBSM 1.1 since they are interdependent. MFC after: 2 weeks Obtained from: TrustedBSD Project Sponsored by: Apple, Inc.
This commit is contained in:
parent
2a5058a3ed
commit
781202d7fd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=191297
@ -67,10 +67,10 @@ au_login_success(void)
|
||||
uid_t uid = pwd->pw_uid;
|
||||
gid_t gid = pwd->pw_gid;
|
||||
pid_t pid = getpid();
|
||||
long au_cond;
|
||||
int au_cond;
|
||||
|
||||
/* 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, &au_cond, sizeof(au_cond)) < 0) {
|
||||
if (errno == ENOSYS)
|
||||
return;
|
||||
errx(1, "login: Could not determine audit condition");
|
||||
@ -115,13 +115,13 @@ au_login_fail(const char *errmsg, int na)
|
||||
{
|
||||
token_t *tok;
|
||||
int aufd;
|
||||
long au_cond;
|
||||
int au_cond;
|
||||
uid_t uid;
|
||||
gid_t gid;
|
||||
pid_t pid = getpid();
|
||||
|
||||
/* 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, &au_cond, sizeof(au_cond)) < 0) {
|
||||
if (errno == ENOSYS)
|
||||
return;
|
||||
errx(1, "login: Could not determine audit condition");
|
||||
@ -175,10 +175,10 @@ audit_logout(void)
|
||||
uid_t uid = pwd->pw_uid;
|
||||
gid_t gid = pwd->pw_gid;
|
||||
pid_t pid = getpid();
|
||||
long au_cond;
|
||||
int au_cond;
|
||||
|
||||
/* 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, &au_cond, sizeof(int)) < 0) {
|
||||
if (errno == ENOSYS)
|
||||
return;
|
||||
errx(1, "login: Could not determine audit condition");
|
||||
|
Loading…
Reference in New Issue
Block a user