You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2011/05/08 20:36:17 UTC
svn commit: r1100786 - in /httpd/httpd/trunk: CHANGES
modules/aaa/mod_authnz_ldap.c
Author: covener
Date: Sun May 8 18:36:17 2011
New Revision: 1100786
URL: http://svn.apache.org/viewvc?rev=1100786&view=rev
Log:
PR51163: Resolve crashes when LDAP is used for authorization-only
Submitted By: Scott Hill <shill genscape.com>
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/modules/aaa/mod_authnz_ldap.c
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1100786&r1=1100785&r2=1100786&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Sun May 8 18:36:17 2011
@@ -2,6 +2,9 @@
Changes with Apache 2.3.12
+ *) mod_authnz_ldap: Resolve crash when LDAP is used for authorization only
+ [Scott Hill <shill genscape.com>]
+
*) support: Make sure check_forensic works with mod_unique_id loaded
[Joe Schaefer]
Modified: httpd/httpd/trunk/modules/aaa/mod_authnz_ldap.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_authnz_ldap.c?rev=1100786&r1=1100785&r2=1100786&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_authnz_ldap.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_authnz_ldap.c Sun May 8 18:36:17 2011
@@ -827,6 +827,8 @@ static authz_status ldapgroup_check_auth
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"ldap authorize: Creating LDAP req structure");
+ req = (authn_ldap_request_t *)apr_pcalloc(r->pool,
+ sizeof(authn_ldap_request_t));
/* Build the username filter */
authn_ldap_build_filter(filtbuf, r, r->user, NULL, sec);
@@ -841,8 +843,6 @@ static authz_status ldapgroup_check_auth
return AUTHZ_DENIED;
}
- req = (authn_ldap_request_t *)apr_pcalloc(r->pool,
- sizeof(authn_ldap_request_t));
ap_set_module_config(r->request_config, &authnz_ldap_module, req);
req->dn = apr_pstrdup(r->pool, dn);
req->user = r->user;
@@ -1005,6 +1005,8 @@ static authz_status ldapdn_check_authori
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"ldap authorize: Creating LDAP req structure");
+ req = (authn_ldap_request_t *)apr_pcalloc(r->pool,
+ sizeof(authn_ldap_request_t));
/* Build the username filter */
authn_ldap_build_filter(filtbuf, r, r->user, NULL, sec);
@@ -1019,8 +1021,6 @@ static authz_status ldapdn_check_authori
return AUTHZ_DENIED;
}
- req = (authn_ldap_request_t *)apr_pcalloc(r->pool,
- sizeof(authn_ldap_request_t));
ap_set_module_config(r->request_config, &authnz_ldap_module, req);
req->dn = apr_pstrdup(r->pool, dn);
req->user = r->user;
@@ -1115,6 +1115,8 @@ static authz_status ldapattribute_check_
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"ldap authorize: Creating LDAP req structure");
+ req = (authn_ldap_request_t *)apr_pcalloc(r->pool,
+ sizeof(authn_ldap_request_t));
/* Build the username filter */
authn_ldap_build_filter(filtbuf, r, r->user, NULL, sec);
@@ -1129,8 +1131,6 @@ static authz_status ldapattribute_check_
return AUTHZ_DENIED;
}
- req = (authn_ldap_request_t *)apr_pcalloc(r->pool,
- sizeof(authn_ldap_request_t));
ap_set_module_config(r->request_config, &authnz_ldap_module, req);
req->dn = apr_pstrdup(r->pool, dn);
req->user = r->user;
@@ -1229,6 +1229,8 @@ static authz_status ldapfilter_check_aut
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"ldap authorize: Creating LDAP req structure");
+ req = (authn_ldap_request_t *)apr_pcalloc(r->pool,
+ sizeof(authn_ldap_request_t));
/* Build the username filter */
authn_ldap_build_filter(filtbuf, r, r->user, NULL, sec);
@@ -1243,8 +1245,6 @@ static authz_status ldapfilter_check_aut
return AUTHZ_DENIED;
}
- req = (authn_ldap_request_t *)apr_pcalloc(r->pool,
- sizeof(authn_ldap_request_t));
ap_set_module_config(r->request_config, &authnz_ldap_module, req);
req->dn = apr_pstrdup(r->pool, dn);
req->user = r->user;