Commit 442ea68a authored by Graham Leggett's avatar Graham Leggett
Browse files

Fix a potential segfault if the bind password in the LDAP cache

is NULL.
PR:	26686
Obtained from:
Submitted by:	Jari Ahonen <jah@progress.com>
Reviewed by:	jim, trawick, bnicholes, minfrin


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@103732 13f79535-47bb-0310-9956-ffa450edef68
parent 88ebd615
Loading
Loading
Loading
Loading
+3 −0
Changes for CHANGES: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
Changes with Apache 2.0.50
  *) Fix a potential segfault if the bind password in the LDAP cache
     is NULL. PR 26686 [Jari Ahonen <jah@progress.com>]
  *) Quotes cannot be used around require group and require dn
     directives, update the documentation to reflect this. Also add
     quotes around the dn and group within debug messages, to make it
+1 −7
Changes for STATUS: 1 added line, 7 removed lines.
Original line number Diff line number Diff line
APACHE 2.0 STATUS:                                              -*-text-*-
Last modified at [$Date: 2004/05/21 23:39:41 $]
Last modified at [$Date: 2004/05/21 23:49:10 $]

Release:

@@ -79,12 +79,6 @@ PATCHES TO BACKPORT FROM 2.1
       PR 24922 [Pascal Terjan <pterjan@linuxfr.org>]
       +1: minfrin

    *) Fix a potential segfault if the bind password in the LDAP cache
       is NULL.
       modules/experimental/util_ldap_cache.c r1.16
       PR 26686 [Jari Ahonen <jah@progress.com>]
       +1: jim, trawick, bnicholes

    *) Fix handling of IPv6 numeric strings in mod_proxy.
         modules/proxy/proxy_ftp.c r1.141, r1.142
         modules/proxy/proxy_http.c r1.186
+9 −2
Changes for modules/experimental/util_ldap_cache.c: 9 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -122,11 +122,18 @@ void *util_ldap_search_node_copy(util_ald_cache_t *cache, void *c)
            newnode->vals = NULL;
        }
        if (!(newnode->username = util_ald_strdup(cache, node->username)) ||
            !(newnode->dn = util_ald_strdup(cache, node->dn)) ||
            !(newnode->bindpw = util_ald_strdup(cache, node->bindpw)) ) {
            !(newnode->dn = util_ald_strdup(cache, node->dn)) ) {
            util_ldap_search_node_free(cache, newnode);
            return NULL;
        }
        if(node->bindpw) {
            if(!(newnode->bindpw = util_ald_strdup(cache, node->bindpw))) {
                util_ldap_search_node_free(cache, newnode);
                return NULL;
            }
        } else {
            newnode->bindpw = NULL;
        }
        newnode->lastbind = node->lastbind;

    }