Skip to content
Browse files

Avoid duplicate PAM log message

This removes a duplicate call to _log_msg() when a user's access is
denied or "no_sys_info" command line option is NOT set. The duplicate
log message was a result of commit 12ba7f7
on January 29, 2010. Patch from Mark Grondona, LLNL.
  • Loading branch information...
1 parent 7423c5d commit 9258bcf42a0a823e0dcf6fc09dcd7f3be0b3cd3b @jette jette committed
Showing with 5 additions and 2 deletions.
  1. +5 −2 contribs/pam/pam_slurm.c
View
7 contribs/pam/pam_slurm.c
@@ -136,13 +136,16 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc, const char **argv)
if ((auth != PAM_SUCCESS) && (!opts.enable_silence))
_send_denial_msg(pamh, &opts, user, uid);
+
+ /*
+ * Generate an entry to the system log if access was
+ * denied (!PAM_SUCCESS) or disable_sys_info is not set
+ */
if ((auth != PAM_SUCCESS) || (!opts.disable_sys_info)) {
_log_msg(LOG_INFO, "access %s for user %s (uid=%d)",
(auth == PAM_SUCCESS) ? "granted" : "denied",
user, uid);
}
- _log_msg(LOG_INFO, "access %s for user %s (uid=%d)",
- (auth == PAM_SUCCESS) ? "granted" : "denied", user, uid);
return(auth);
}

0 comments on commit 9258bcf

Please sign in to comment.
Something went wrong with that request. Please try again.