lists.arthurdejong.org
RSS feed

nss-pam-ldapd branch master updated. 0.9.6-11-gc879485

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

nss-pam-ldapd branch master updated. 0.9.6-11-gc879485



This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "nss-pam-ldapd".

The branch, master has been updated
       via  c879485dd19f999797d255b2cf4baa61c3dd15c4 (commit)
       via  3d09e28ff7a93ed48ed665673aeb971a245ffead (commit)
      from  f089e0122dc37c416344cddc224d56b43c2783ea (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://arthurdejong.org/git/nss-pam-ldapd/commit/?id=c879485dd19f999797d255b2cf4baa61c3dd15c4

commit c879485dd19f999797d255b2cf4baa61c3dd15c4
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Sun Sep 20 14:15:14 2015 +0200

    Fail-over and retry on more errors
    
    Also try to fail over to another LDAP server on a larger number of
    errors. Specifically errors that point to problems connecting to the
    LDAP server.

diff --git a/nslcd/myldap.c b/nslcd/myldap.c
index afe03bd..d775d2e 100644
--- a/nslcd/myldap.c
+++ b/nslcd/myldap.c
@@ -1645,7 +1645,10 @@ MYLDAP_ENTRY *myldap_get_entry(MYLDAP_SEARCH *search, 
int *rcp)
         /* close connection on some connection problems */
         if ((rc == LDAP_UNAVAILABLE) || (rc == LDAP_SERVER_DOWN) ||
             (rc == LDAP_SUCCESS) || (rc == LDAP_TIMELIMIT_EXCEEDED) ||
-            (rc == LDAP_OPERATIONS_ERROR) || (rc == LDAP_PROTOCOL_ERROR))
+            (rc == LDAP_OPERATIONS_ERROR) || (rc == LDAP_PROTOCOL_ERROR) ||
+            (rc == LDAP_BUSY) || (rc == LDAP_UNWILLING_TO_PERFORM) ||
+            (rc == LDAP_TIMEOUT) || (rc == LDAP_CONNECT_ERROR) ||
+            (rc == LDAP_NOT_SUPPORTED))
         {
           do_close(search->session);
           /* retry once if no data has been received yet */

http://arthurdejong.org/git/nss-pam-ldapd/commit/?id=3d09e28ff7a93ed48ed665673aeb971a245ffead

commit 3d09e28ff7a93ed48ed665673aeb971a245ffead
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Sat Aug 29 13:49:13 2015 +0200

    Open connection before do_try_search()
    
    This is in preparation for splitting the BIND from the search phase for
    authentication.

diff --git a/nslcd/myldap.c b/nslcd/myldap.c
index df9a465..afe03bd 100644
--- a/nslcd/myldap.c
+++ b/nslcd/myldap.c
@@ -1098,6 +1098,7 @@ void myldap_get_policy_response(MYLDAP_SESSION *session, 
int *response,
     *message = session->policy_message;
 }
 
+/* perform a search operation, the connection is assumed to be open */
 static int do_try_search(MYLDAP_SEARCH *search)
 {
   int ctrlidx = 0;
@@ -1109,10 +1110,6 @@ static int do_try_search(MYLDAP_SEARCH *search)
   char *deref_attrs[2];
 #endif /* HAVE_LDAP_CREATE_DEREF_CONTROL */
   int msgid;
-  /* ensure that we have an open connection */
-  rc = do_open(search->session);
-  if (rc != LDAP_SUCCESS)
-    return rc;
   /* if we're using paging, build a page control */
   if ((nslcd_cfg->pagesize > 0) && (search->scope != LDAP_SCOPE_BASE))
   {
@@ -1274,7 +1271,10 @@ static int do_retry_search(MYLDAP_SEARCH *search)
       {
         /* try to start the search */
         pthread_mutex_unlock(&uris_mutex);
-        rc = do_try_search(search);
+        /* ensure that we have an open connection and start a search */
+        rc = do_open(search->session);
+        if (rc == LDAP_SUCCESS)
+          rc = do_try_search(search);
         if (rc == LDAP_SUCCESS)
         {
           pthread_mutex_lock(&uris_mutex);

-----------------------------------------------------------------------

Summary of changes:
 nslcd/myldap.c |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
nss-pam-ldapd
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/