From 8f7f6da06091153702f38e283d8f34778ccf9eb2 Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Wed, 13 Aug 2014 14:45:05 +0200 Subject: 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 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/pam_access/pam_access.c b/modules/pam_access/pam_access.c index 87626e73..b32a966b 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); } -- cgit v1.2.3