1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-07 04:02:58 +03:00

Fix load order dependencies in LDAP code by switching to use of APR

optional functions for the inter-module API:

* modules/ldap/ldap_private.h: New file, containing "real" function
  declarations, copied from...

* include/ap_ldap.h.in, include/ap_ldap_url.h,
  include/ap_ldap_option.h, include/ap_ldap_init.h,
  include/ap_ldap_rebind.h: ... here.  All declarations changed to APR
  optional function declarations.

* modules/ldap/util_ldap.c (util_ldap_register_hooks): Register all
  the new optional functions.

* modules/aaa/mod_authnz_ldap.c (ImportULDAPOptFn): Pick up optional
  function stub for ap_ldap_url_parse.
  (mod_auth_ldap_parse_url): Use it here.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1140069 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Joe Orton
2011-06-27 09:27:04 +00:00
parent 96d20eaf2e
commit 559c6ae018
9 changed files with 140 additions and 81 deletions

View File

@@ -42,6 +42,8 @@
#error mod_ldap requires httpd to detect LDAP support
#endif
#include "ldap_private.h"
#ifdef LDAP_OPT_DEBUG_LEVEL
#define AP_LDAP_OPT_DEBUG LDAP_OPT_DEBUG_LEVEL
#else
@@ -2943,6 +2945,21 @@ static void util_ldap_register_hooks(apr_pool_t *p)
APR_REGISTER_OPTIONAL_FN(uldap_ssl_supported);
APR_REGISTER_OPTIONAL_FN(uldap_cache_check_subgroups);
APR_REGISTER_OPTIONAL_FN(ap_ldap_get_option);
APR_REGISTER_OPTIONAL_FN(ap_ldap_info);
APR_REGISTER_OPTIONAL_FN(ap_ldap_init);
APR_REGISTER_OPTIONAL_FN(ap_ldap_is_ldap_url);
APR_REGISTER_OPTIONAL_FN(ap_ldap_is_ldapi_url);
APR_REGISTER_OPTIONAL_FN(ap_ldap_is_ldaps_url);
APR_REGISTER_OPTIONAL_FN(ap_ldap_rebind_add);
APR_REGISTER_OPTIONAL_FN(ap_ldap_rebind_init);
APR_REGISTER_OPTIONAL_FN(ap_ldap_rebind_remove);
APR_REGISTER_OPTIONAL_FN(ap_ldap_set_option);
APR_REGISTER_OPTIONAL_FN(ap_ldap_ssl_deinit);
APR_REGISTER_OPTIONAL_FN(ap_ldap_ssl_init);
APR_REGISTER_OPTIONAL_FN(ap_ldap_url_parse);
APR_REGISTER_OPTIONAL_FN(ap_ldap_url_parse_ext);
ap_hook_pre_config(util_ldap_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_post_config(util_ldap_post_config,NULL,NULL,APR_HOOK_MIDDLE);
ap_hook_handler(util_ldap_handler, NULL, NULL, APR_HOOK_MIDDLE);