]> git.sur5r.net Git - openldap/commitdiff
+ Fixed ldapsearch paged results size 0 bug
authorKurt Zeilenga <kurt@openldap.org>
Sat, 28 Aug 2004 15:35:42 +0000 (15:35 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 28 Aug 2004 15:35:42 +0000 (15:35 +0000)
+       Fixed libldap SASL host connected to bug
+       Fixed libldap SASL proper sockbuf bug
+       Fixed libldap getaddrinfo hints portability bug

CHANGES
clients/tools/ldapsearch.c
libraries/libldap/cyrus.c
libraries/libldap/os-ip.c

diff --git a/CHANGES b/CHANGES
index 0e92ce7f5c1c586720254f0815e2037169af7d9d..d9f4f7cf9d3aa508900d5d2e23a64e630e19dcc6 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,14 @@
 OpenLDAP 2.2 Change Log
 
+OpenLDAP 2.2.16 Engineering
+       Fixed ldapsearch paged results size 0 bug 
+       Fixed libldap SASL host connected to bug
+       Fixed libldap SASL proper sockbuf bug
+       Fixed libldap getaddrinfo hints portability bug
+       Updated LDAP C++ library
+       Documentation
+               Updated provided RFCs and I-Ds
+
 OpenLDAP 2.2.15 Release
        Fixed back-bdb DB_DEADLOCK memory leak bug (ITS#3213)
        Fixed back-bdb dbcache locking bug (ITS#3201)
index 5adbde0416af07f1b57cc89b4cc4749f1c830611..95bc3399167ff8d085b88fd7df3a1da24f8481cd 100644 (file)
@@ -659,7 +659,7 @@ getNextPage:
                || domainScope
 #endif
 #ifdef LDAP_CONTROL_PAGEDRESULTS
-               || pageSize
+               || pagedResults
 #endif
                || ldapsync
                || subentries || valuesReturnFilter )
@@ -834,7 +834,7 @@ getNextPage:
                                valuesReturnFilter > 1 ? _("critical ") : "", vrFilter );
                }
 #ifdef LDAP_CONTROL_PAGEDRESULTS
-               if ( pageSize ) {
+               if ( pagedResults ) {
                        printf(_("\n# with pagedResults %scontrol: size=%d"),
                                (pagedResults > 1) ? _("critical ") : "", 
                                pageSize );
@@ -902,7 +902,7 @@ getNextPage:
                        }
                }
 
-               goto getNextPage;       
+               goto getNextPage;
        }
 #endif
 
@@ -1040,6 +1040,8 @@ static int dosearch(
                                        } else {
                                                morePagedResults = 0;
                                        }
+                               } else {
+                                       morePagedResults = 0;
                                }
 #endif
 
@@ -1093,18 +1095,18 @@ static int dosearch(
 done:
        ldap_msgfree( res );
 #ifdef LDAP_CONTROL_PAGEDRESULTS
-       if ( pageSize != 0 ) { 
-               npagedresponses = npagedresponses + nresponses;
-               npagedentries = npagedentries + nentries;
-               npagedreferences = npagedreferences + nreferences;
-               npagedextended = npagedextended + nextended;
-               npagedpartial = npagedpartial + npartial;
+       if ( pagedResults ) { 
+               npagedresponses += nresponses;
+               npagedentries += nentries;
+               npagedextended += nextended;
+               npagedpartial += npartial;
+               npagedreferences += nreferences;
                if ( ( morePagedResults == 0 ) && ( ldif < 2 ) ) {
                        printf( _("\n# numResponses: %d\n"), npagedresponses );
-                       if( nentries ) printf( _("# numEntries: %d\n"), npagedentries );
-                       if( nextended ) printf( _("# numExtended: %d\n"), npagedextended );
-                       if( npartial ) printf( _("# numPartial: %d\n"), npagedpartial );
-                       if( nreferences ) printf( _("# numReferences: %d\n"), npagedreferences );
+                       if( npagedentries ) printf( _("# numEntries: %d\n"), npagedentries );
+                       if( npagedextended ) printf( _("# numExtended: %d\n"), npagedextended );
+                       if( npagedpartial ) printf( _("# numPartial: %d\n"), npagedpartial );
+                       if( npagedreferences ) printf( _("# numReferences: %d\n"), npagedreferences );
                }
        } else
 #endif
index 3eb84808459cd9e0740bcf6f67443bfebcbd885e..e1610f6bd06d0208f8652fca1071a1fc36cd0a7f 100644 (file)
@@ -603,7 +603,7 @@ ldap_int_sasl_bind(
                rc = ldap_open_defconn( ld );
                if( rc < 0 ) return ld->ld_errno;
 
-               ber_sockbuf_ctrl( ld->ld_sb, LBER_SB_OPT_GET_FD, &sd );
+               ber_sockbuf_ctrl( ld->ld_defconn->lconn_sb, LBER_SB_OPT_GET_FD, &sd );
 
                if( sd == AC_SOCKET_INVALID ) {
                        ld->ld_errno = LDAP_LOCAL_ERROR;
@@ -621,7 +621,7 @@ ldap_int_sasl_bind(
                ld->ld_defconn->lconn_sasl_authctx = NULL;
        }
 
-       { char *saslhost = ldap_host_connected_to( ld->ld_sb, "localhost" );
+       { char *saslhost = ldap_host_connected_to( ld->ld_defconn->lconn_sb, "localhost" );
        rc = ldap_int_sasl_open( ld, ld->ld_defconn, saslhost );
        LDAP_FREE( saslhost );
        }
@@ -631,7 +631,7 @@ ldap_int_sasl_bind(
        ctx = ld->ld_defconn->lconn_sasl_authctx;
 
        /* Check for TLS */
-       ssl = ldap_pvt_tls_sb_ctx( ld->ld_sb );
+       ssl = ldap_pvt_tls_sb_ctx( ld->ld_defconn->lconn_sb );
        if ( ssl ) {
                struct berval authid = BER_BVNULL;
                ber_len_t fac;
@@ -831,7 +831,7 @@ ldap_int_sasl_bind(
                        if ( ld->ld_defconn->lconn_sasl_sockctx ) {
                                oldctx = ld->ld_defconn->lconn_sasl_sockctx;
                                sasl_dispose( &oldctx );
-                               ldap_pvt_sasl_remove( ld->ld_sb );
+                               ldap_pvt_sasl_remove( ld->ld_defconn->lconn_sb );
                        }
                        ldap_pvt_sasl_install( ld->ld_conns->lconn_sb, ctx );
                        ld->ld_defconn->lconn_sasl_sockctx = ctx;
index 1b3b515810f9df221672fb3856bd40b59220d969..48d05422e050307a3bbf68783666b3aa7116ff89 100644 (file)
@@ -368,9 +368,10 @@ ldap_connect_to_host(LDAP *ld, Sockbuf *sb,
 
 #if defined( HAVE_GETADDRINFO ) && defined( HAVE_INET_NTOP )
        memset( &hints, '\0', sizeof(hints) );
-#ifdef AI_ADDRCONFIG
-       hints.ai_flags = AI_ADDRCONFIG;
-#endif 
+#ifdef USE_AI_ATTRCONFIG /* FIXME: configure test needed */
+       /* Use AI_ATTRCONFIG only on systems where its known to be needed. */
+       hints.ai_flags = AI_ATTRCONFIG;
+#endif
        hints.ai_family = ldap_int_inet4or6;
        hints.ai_socktype = socktype;
        snprintf(serv, sizeof serv, "%d", port );