httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rede...@apache.org
Subject svn commit: r727773 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS modules/ldap/util_ldap.c
Date Thu, 18 Dec 2008 17:31:06 GMT
Author: rederpj
Date: Thu Dec 18 09:31:03 2008
New Revision: 727773

URL: http://svn.apache.org/viewvc?rev=727773&view=rev
Log:
Commit promoted backport of PR 45994.
  *) mod_ldap: Avoid a segfault when result->rc is checked in uldap_connection_init
     when result is NULL. This could happen if LDAP initialization failed.
     PR 45994.  [Dan Poirier <poirier pobox.com>]

Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/modules/ldap/util_ldap.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=727773&r1=727772&r2=727773&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Thu Dec 18 09:31:03 2008
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.12
 
+  *) mod_ldap: Avoid a segfault when result->rc is checked in uldap_connection_init
+     when result is NULL. This could happen if LDAP initialization failed.
+     PR 45994.  [Dan Poirier <poirier pobox.com>]
+
   *) Set Listen protocol to "https" if port is set to 443 and no proto is specified
      (as documented but not implemented). PR 46066  [Dan Poirier <poirier pobox.com>]
 

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=727773&r1=727772&r2=727773&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Thu Dec 18 09:31:03 2008
@@ -86,15 +86,6 @@
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
- * mod_ldap: Avoid a segfault when result->rc is checked in uldap_connection_init
-   when result is NULL. This could happen if LDAP initialization failed.
-   PR 45994.  [Dan Poirier <poirier pobox.com>]
-   Trunk version of patch:
-      http://svn.apache.org/viewvc?view=rev&revision=727053
-   Backport version for 2.2.x of patch:
-      http://people.apache.org/~rederpj/backport_PR45994_util_ldap.c.diff
-   +1: rederpj, rpluem, covener
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 

Modified: httpd/httpd/branches/2.2.x/modules/ldap/util_ldap.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/ldap/util_ldap.c?rev=727773&r1=727772&r2=727773&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/ldap/util_ldap.c (original)
+++ httpd/httpd/branches/2.2.x/modules/ldap/util_ldap.c Thu Dec 18 09:31:03 2008
@@ -232,7 +232,16 @@
                   &(result));
 
 
-    if (result != NULL && result->rc) {
+    if (NULL == result) {
+        /* something really bad happened */
+        ldc->bound = 0;
+        if (NULL == ldc->reason) {
+            ldc->reason = "LDAP: ldap initialization failed";
+        }
+        return(APR_EGENERAL);
+    }
+
+    if (result->rc) {
         ldc->reason = result->reason;
     }
 



Mime
View raw message