mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
* mod_ldap: Correctly return all requested attribute values
when some attributes have a null value. PR: 44560 Submitted by: Anders Kaseorg <anders kaseorg.com> Reviewed by: covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@634821 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
4
CHANGES
4
CHANGES
@@ -1,6 +1,10 @@
|
|||||||
-*- coding: utf-8 -*-
|
-*- coding: utf-8 -*-
|
||||||
Changes with Apache 2.3.0
|
Changes with Apache 2.3.0
|
||||||
[ When backported to 2.2.x, remove entry from this file ]
|
[ When backported to 2.2.x, remove entry from this file ]
|
||||||
|
|
||||||
|
*) mod_ldap: Correctly return all requested attribute values
|
||||||
|
when some attributes have a null value.
|
||||||
|
PR 44560 [Anders Kaseorg <anders kaseorg.com>]
|
||||||
|
|
||||||
*) core: check symlink ownership if both FollowSymlinks and
|
*) core: check symlink ownership if both FollowSymlinks and
|
||||||
SymlinksIfOwnerMatch are set [Nick Kew]
|
SymlinksIfOwnerMatch are set [Nick Kew]
|
||||||
|
@@ -1462,13 +1462,10 @@ static int uldap_cache_checkuserid(request_rec *r, util_ldap_connection_t *ldc,
|
|||||||
/* ...and entry is valid */
|
/* ...and entry is valid */
|
||||||
*binddn = apr_pstrdup(r->pool, search_nodep->dn);
|
*binddn = apr_pstrdup(r->pool, search_nodep->dn);
|
||||||
if (attrs) {
|
if (attrs) {
|
||||||
int i = 0, k = 0;
|
int i;
|
||||||
while (attrs[k++]);
|
*retvals = apr_pcalloc(r->pool, sizeof(char *) * search_nodep->numvals);
|
||||||
*retvals = apr_pcalloc(r->pool, sizeof(char *) * k);
|
for (i = 0; i < search_nodep->numvals; i++) {
|
||||||
while (search_nodep->vals[i]) {
|
(*retvals)[i] = apr_pstrdup(r->pool, search_nodep->vals[i]);
|
||||||
(*retvals)[i] = apr_pstrdup(r->pool,
|
|
||||||
search_nodep->vals[i]);
|
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LDAP_CACHE_UNLOCK();
|
LDAP_CACHE_UNLOCK();
|
||||||
@@ -1712,13 +1709,10 @@ static int uldap_cache_getuserdn(request_rec *r, util_ldap_connection_t *ldc,
|
|||||||
/* ...and entry is valid */
|
/* ...and entry is valid */
|
||||||
*binddn = apr_pstrdup(r->pool, search_nodep->dn);
|
*binddn = apr_pstrdup(r->pool, search_nodep->dn);
|
||||||
if (attrs) {
|
if (attrs) {
|
||||||
int i = 0, k = 0;
|
int i;
|
||||||
while (attrs[k++]);
|
*retvals = apr_pcalloc(r->pool, sizeof(char *) * search_nodep->numvals);
|
||||||
*retvals = apr_pcalloc(r->pool, sizeof(char *) * k);
|
for (i = 0; i < search_nodep->numvals; i++) {
|
||||||
while (search_nodep->vals[i]) {
|
(*retvals)[i] = apr_pstrdup(r->pool, search_nodep->vals[i]);
|
||||||
(*retvals)[i] = apr_pstrdup(r->pool,
|
|
||||||
search_nodep->vals[i]);
|
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LDAP_CACHE_UNLOCK();
|
LDAP_CACHE_UNLOCK();
|
||||||
|
Reference in New Issue
Block a user