diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2012-11-11 22:46:23 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2012-11-11 22:46:23 +0000 |
commit | 702105695b26a12d47203fbacb4fc8057858a8b3 (patch) | |
tree | 4caa533e2b5d0b82e545c2554f5fd5722064da5b | |
parent | 027e069b00adb1b074ea4c745192bad3189d3ec6 (diff) |
log the PAM error message along with the message from nslcd if it is available
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1823 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r-- | pam/pam.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -493,8 +493,12 @@ int pam_sm_acct_mgmt(pam_handle_t *pamh,int flags,int argc,const char **argv) { /* turn in to generic PAM error message if message is empty */ if ((ctx2.authzmsg==NULL)||(ctx2.authzmsg[0]=='\0')) + { ctx2.authzmsg=(char *)pam_strerror(pamh,ctx2.authz); - pam_syslog(pamh,LOG_NOTICE,"%s; user=%s",ctx2.authzmsg,username); + pam_syslog(pamh,LOG_NOTICE,"%s; user=%s",ctx2.authzmsg,username); + } + else + pam_syslog(pamh,LOG_NOTICE,"%s; user=%s; err=%s",ctx2.authzmsg,username,pam_strerror(pamh,rc)); rc=remap_pam_rc(ctx2.authz,&cfg); if ((rc!=PAM_IGNORE)&&(!cfg.no_warn)) pam_error(pamh,"%s",ctx2.authzmsg); |