summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorTomas Mraz <tmraz@fedoraproject.org>2014-08-13 14:45:05 +0200
committerTomas Mraz <tmraz@fedoraproject.org>2014-08-13 14:45:05 +0200
commit8f7f6da06091153702f38e283d8f34778ccf9eb2 (patch)
tree823b82f64f5230c5aa232c36fcf653d1f74f5c91 /modules
parent8731716646adc8065b45dc59b5e9ca1893d5a495 (diff)
pam_access: Avoid uninitialized access of line.
* modules/pam_access/pam_access.c (login_access): Reorder condition so line is not accessed when uninitialized.
Diffstat (limited to 'modules')
-rw-r--r--modules/pam_access/pam_access.c4
1 files changed, 2 insertions, 2 deletions
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);
}