lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1823 - nss-pam-ldapd/pam

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd commit: r1823 - nss-pam-ldapd/pam



Author: arthur
Date: Sun Nov 11 23:46:23 2012
New Revision: 1823
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1823&view=revision

Log:
log the PAM error message along with the message from nslcd if it is available

Modified:
   nss-pam-ldapd/pam/pam.c

Modified: nss-pam-ldapd/pam/pam.c
==============================================================================
--- nss-pam-ldapd/pam/pam.c     Sun Nov 11 17:44:55 2012        (r1822)
+++ nss-pam-ldapd/pam/pam.c     Sun Nov 11 23:46:23 2012        (r1823)
@@ -493,8 +493,12 @@
   {
     /* 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);
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/