commit 8f7f6da06091153702f38e283d8f34778ccf9eb2
Author: Tomas Mraz <tmraz(a)fedoraproject.org>
Date: Wed Aug 13 14:45:05 2014 +0200
pam_access: Avoid uninitialized access of line.
* modules/pam_access/pam_access.c (login_access): Reorder condition
so line is not accessed when uninitialized.
modules/pam_access/pam_access.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/modules/pam_access/pam_access.c b/modules/pam_access/pam_access.c
index 87626e7..b32a966 100644
--- a/modules/pam_access/pam_access.c
+++ b/modules/pam_access/pam_access.c
@@ -412,8 +412,8 @@ login_access (pam_handle_t *pamh, struct login_info *item)
return NO;
}
#ifdef HAVE_LIBAUDIT
- if (!item->noaudit && line[0] == '-' && (match == YES ||
(match == ALL &&
- nonall_match == YES))) {
+ if (!item->noaudit && (match == YES || (match == ALL &&
+ nonall_match == YES)) && line[0] == '-') {
pam_modutil_audit_write(pamh, AUDIT_ANOM_LOGIN_LOCATION,
"pam_access", 0);
}
Show replies by thread