From: Jim Jagielski Date: Tue, 6 May 2008 13:38:00 +0000 (+0000) Subject: PR: 44560 X-Git-Tag: 2.2.9~221 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd12783fd99d19a072d665db30720bfbd64fe2ce;p=thirdparty%2Fapache%2Fhttpd.git PR: 44560 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@653772 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index 0c3a801aaa5..4425f2d07cf 100644 --- a/STATUS +++ b/STATUS @@ -88,14 +88,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * mod_ldap: Correctly return all requested attribute values - when some attributes have a null value. - PR: 44560 - Trunk version of patch: - http://svn.apache.org/viewvc?rev=634821&view=rev - Backport version for 2.2.x of patch: - http://people.apache.org/~covener/2.2.x-pr44560.diff - +1 covener, niq, trawick PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/modules/ldap/util_ldap.c b/modules/ldap/util_ldap.c index b04511f4b8a..5ea50d0a6c8 100644 --- a/modules/ldap/util_ldap.c +++ b/modules/ldap/util_ldap.c @@ -925,12 +925,10 @@ static int uldap_cache_checkuserid(request_rec *r, util_ldap_connection_t *ldc, /* ...and entry is valid */ *binddn = apr_pstrdup(r->pool, search_nodep->dn); if (attrs) { - int i = 0, k = 0; - while (attrs[k++]); - *retvals = apr_pcalloc(r->pool, sizeof(char *) * k); - while (search_nodep->vals[i]) { + int i; + *retvals = apr_pcalloc(r->pool, sizeof(char *) * search_nodep->numvals); + for (i = 0; i < search_nodep->numvals; i++) { (*retvals)[i] = apr_pstrdup(r->pool, search_nodep->vals[i]); - i++; } } LDAP_CACHE_UNLOCK(); @@ -1174,12 +1172,10 @@ static int uldap_cache_getuserdn(request_rec *r, util_ldap_connection_t *ldc, /* ...and entry is valid */ *binddn = apr_pstrdup(r->pool, search_nodep->dn); if (attrs) { - int i = 0, k = 0; - while (attrs[k++]); - *retvals = apr_pcalloc(r->pool, sizeof(char *) * k); - while (search_nodep->vals[i]) { + int i; + *retvals = apr_pcalloc(r->pool, sizeof(char *) * search_nodep->numvals); + for (i = 0; i < search_nodep->numvals; i++) { (*retvals)[i] = apr_pstrdup(r->pool, search_nodep->vals[i]); - i++; } } LDAP_CACHE_UNLOCK();