lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1113 - nss-pam-ldapd/nslcd

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

nss-pam-ldapd commit: r1113 - nss-pam-ldapd/nslcd



Author: arthur
Date: Sat May 22 15:12:39 2010
New Revision: 1113
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1113

Log:
make debug logging for pam_authz_search option a little more readable

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

Modified: nss-pam-ldapd/nslcd/pam.c
==============================================================================
--- nss-pam-ldapd/nslcd/pam.c   Thu May 20 21:21:35 2010        (r1112)
+++ nss-pam-ldapd/nslcd/pam.c   Sat May 22 15:12:39 2010        (r1113)
@@ -237,9 +237,10 @@
   if (expr_parse(searchfilter,filter_buffer,sizeof(filter_buffer),
                  autzsearch_var_get,(void *)dict)==NULL)
   {
-    log_log(LOG_ERR,"authorisation search \"%s\" is invalid",searchfilter);
+    log_log(LOG_ERR,"pam_authz_search \"%s\" is invalid",searchfilter);
     return -1;
   }
+  log_log(LOG_DEBUG,"trying pam_authz_search \"%s\"",filter_buffer);
   /* perform the search */
   attrs[0]="dn";
   attrs[1]=NULL;
@@ -248,7 +249,7 @@
                        filter_buffer,attrs,&rc);
   if (search==NULL)
   {
-    log_log(LOG_ERR,"authorisation search \"%s\" failed: %s",
+    log_log(LOG_ERR,"pam_authz_search \"%s\" failed: %s",
             filter_buffer,ldap_err2string(rc));
     return -1;
   }
@@ -256,9 +257,10 @@
   entry=myldap_get_entry(search,NULL);
   if (entry==NULL)
   {
-    log_log(LOG_ERR,"no entry found");
+    log_log(LOG_ERR,"pam_authz_search \"%s\" found no matches",filter_buffer);
     return -1;
   }
+  log_log(LOG_DEBUG,"pam_authz_search found \"%s\"",myldap_get_dn(entry));
   /* we've found an entry so it's OK */
   return 0;
 }
@@ -310,7 +312,6 @@
     autzsearch_var_add(dict,"uid",username);
     if (try_autzsearch(session,dict,nslcd_cfg->ldc_pam_authz_search))
     {
-      log_log(LOG_DEBUG,"LDAP authorisation check failed");
       WRITE_INT32(fp,NSLCD_RESULT_BEGIN);
       WRITE_STRING(fp,username);
       WRITE_STRING(fp,userdn);
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits