From 781202d7fdc79041930d1707e3546d334cb3f4e4 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Sun, 19 Apr 2009 23:34:22 +0000 Subject: [PATCH] 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. --- usr.bin/login/login_audit.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.bin/login/login_audit.c b/usr.bin/login/login_audit.c index a50a15893cf9..210f2d7fa0e5 100644 --- a/usr.bin/login/login_audit.c +++ b/usr.bin/login/login_audit.c @@ -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");