From: Kurt Zeilenga Date: Fri, 13 Apr 2001 00:02:18 +0000 (+0000) Subject: Misc bug fixes from DEVEL X-Git-Tag: OPENLDAP_REL_ENG_2_0_8~21 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=161adfbd3de9da1c9f773fe5027d06c7063fb4f9;p=openldap Misc bug fixes from DEVEL --- diff --git a/CHANGES b/CHANGES index 4ff12aa916..4221f1be5b 100644 --- a/CHANGES +++ b/CHANGES @@ -10,11 +10,12 @@ OpenLDAP 2.0.8 Release Engineering Fixed back-passwd nbase bug (ITS#941) Fixed back-shell unbind response bug Fixed back-ldbm oldSuperior bug (ITS#951) + Fixed back-ldbm modify password DN bug (ITS#1060) Fixed libldap SASL GSSAPI interop bug (ITS#884) Fixed libldap TLS/SASL crash bugs (ITS#889) Updated libldap TLS seeding (ITS#948) Updated libldap TLS certificate handling - Updated libldap referral/reference handling (ITS#905) + Updated libldap referral/reference handling (ITS#905,1047) Updated maildap Updated ldaptcl Updated client usage messages diff --git a/libraries/libldap/schema.c b/libraries/libldap/schema.c index e220456481..10951ca1ac 100644 --- a/libraries/libldap/schema.c +++ b/libraries/libldap/schema.c @@ -120,6 +120,10 @@ append_to_safe_string(safe_string * ss, char * s) /* We always make sure there is at least one position available */ if ( ss->pos + l >= ss->size-1 ) { ss->size *= 2; + if ( ss->pos + l >= ss->size-1 ) { + ss->size = ss->pos + l + 1; + } + temp = LDAP_REALLOC(ss->val, ss->size); if ( !temp ) { /* Trouble, out of memory */ diff --git a/libraries/libldap/url.c b/libraries/libldap/url.c index bc12e22719..adc08c9b48 100644 --- a/libraries/libldap/url.c +++ b/libraries/libldap/url.c @@ -221,7 +221,7 @@ ldap_url_parse_ext( LDAP_CONST char *url_in, LDAPURLDesc **ludpp ) const char *url_tmp; char *url; - if( url_in == NULL && ludpp == NULL ) { + if( url_in == NULL || ludpp == NULL ) { return LDAP_URL_ERR_PARAM; } @@ -526,7 +526,6 @@ ldap_url_parse_ext( LDAP_CONST char *url_in, LDAPURLDesc **ludpp ) if( i == 0 ) { /* must have 1 or more */ - ldap_charray_free( ludp->lud_exts ); LDAP_FREE( url ); ldap_free_urldesc( ludp ); return LDAP_URL_ERR_BADEXTS; diff --git a/servers/slapd/back-ldbm/search.c b/servers/slapd/back-ldbm/search.c index 26ea7bf9e9..12b670b3b3 100644 --- a/servers/slapd/back-ldbm/search.c +++ b/servers/slapd/back-ldbm/search.c @@ -72,6 +72,8 @@ ldbm_back_search( /* deref dn and get entry with reader lock */ e = deref_dn_r( be, nbase, &err, &matched, &text ); + if( err == LDAP_NO_SUCH_OBJECT ) err = LDAP_REFERRAL; + } else { /* get entry with reader lock */ e = dn2entry_r( be, nbase, &matched ); @@ -91,6 +93,7 @@ ldbm_back_search( : NULL; cache_return_entry_r( &li->li_cache, matched ); + } else { refs = default_referral; }