42#error mod_ldap requires APR-util to have LDAP support built in
50#ifndef APR_LDAP_SIZELIMIT
51#define APR_LDAP_SIZELIMIT -1
54#ifdef LDAP_OPT_DEBUG_LEVEL
55#define AP_LDAP_OPT_DEBUG LDAP_OPT_DEBUG_LEVEL
58#define AP_LDAP_OPT_DEBUG LDAP_OPT_DEBUG
62#define AP_LDAP_HOPLIMIT_UNSET -1
63#define AP_LDAP_CHASEREFERRALS_SDKDEFAULT -1
64#define AP_LDAP_CHASEREFERRALS_OFF 0
65#define AP_LDAP_CHASEREFERRALS_ON 1
67#define AP_LDAP_CONNPOOL_DEFAULT -1
68#define AP_LDAP_CONNPOOL_INFINITE -2
70#if !defined(LDAP_OPT_NETWORK_TIMEOUT) && defined(LDAP_OPT_CONNECT_TIMEOUT)
71#define LDAP_OPT_NETWORK_TIMEOUT LDAP_OPT_CONNECT_TIMEOUT
74module AP_MODULE_DECLARE_DATA ldap_module;
82#if APR_HAS_OPENLDAP_LDAPSDK && defined(LDAP_API_VERSION) && LDAP_API_VERSION >= 3001
84#define uldap_rebind_init(p) APR_SUCCESS
102#define USE_APR_LDAP_REBIND
105#define uldap_rebind_init(p) apr_ldap_rebind_init(p)
106#define uldap_rebind_add(ldc) apr_ldap_rebind_add((ldc)->rebind_pool, \
107 (ldc)->ldap, (ldc)->binddn, \
113 if (
st->util_ldap_cache_lock) {
124 if (
st->util_ldap_cache_lock) {
180 "<html><head><title>LDAP Cache Information</title></head>\n",
r);
181 ap_rputs(
"<body bgcolor='#ffffff'><h1 align=center>LDAP Cache Information"
230#ifdef USE_APR_LDAP_REBIND
275 for (l=
st->connections; l; l=l->
next) {
278 prev->next = l->
next;
281 st->connections = l->
next;
289 free((
void*)
ldc->bindpw);
292 free((
void*)
ldc->binddn);
314#ifdef LDAP_OPT_NETWORK_TIMEOUT
321#if !APR_HAS_SOLARIS_LDAPSDK
353 ldc->reason =
"LDAP: ldap initialization failed";
368 ldc->reason =
"LDAP: ldap initialization failed";
383 "LDAP: Unable to add rebind cross reference entry. Out of memory?");
385 ldc->reason =
"LDAP: Unable to add rebind cross reference entry.";
427 "LDAP: Setting referrals to %s.",
436 "Unable to set LDAP_OPT_REFERRALS option to %s: %d.",
439 result->reason =
"Unable to set LDAP_OPT_REFERRALS.";
450 "Setting referral hop limit to %d.",
451 ldc->ReferralHopLimit);
454 (
void *)&
ldc->ReferralHopLimit,
458 "Unable to set LDAP_OPT_REFHOPLIMIT option to %d: %d.",
459 ldc->ReferralHopLimit,
461 result->reason =
"Unable to set LDAP_OPT_REFHOPLIMIT.";
470#ifdef APR_LDAP_OPT_VERIFY_CERT
474#if defined(LDAPSSL_VERIFY_SERVER)
475 if (
st->verify_svr_cert) {
481#elif defined(LDAP_OPT_X_TLS_REQUIRE_CERT)
484 if (
st->verify_svr_cert) {
495#ifdef LDAP_OPT_NETWORK_TIMEOUT
496 if (
st->connectionTimeout > 0) {
505 "LDAP: Could not set the connection timeout");
510#ifdef LDAP_OPT_TIMEOUT
524 "LDAP: Could not set LDAP_OPT_TIMEOUT");
535#ifdef LDAP_OPT_ERROR_NUMBER
538#ifdef LDAP_OPT_RESULT_CODE
558 ldc->reason =
"LDAP: ldap_simple_bind() failed";
563 ldc->reason =
"LDAP: ldap_simple_bind() result retrieval failed";
568 ldc->reason =
"LDAP: ldap_simple_bind() timed out";
572 ldc->reason =
"LDAP: ldap_simple_bind() parse result failed";
576 ldc->last_backend_conn =
ldc->r->request_time;
603 if (
ldc->bound && !
ldc->must_rebind)
605 ldc->reason =
"LDAP: connection open successful (already bound)";
650 "ldap_simple_bind() failed with server down "
655 "ldap_simple_bind() timed out on %s "
656 "connection, dropped by firewall?",
666 "attempt to re-init the connection");
680 ldc->reason =
"LDAP: ldap_simple_bind() failed";
684 ldc->must_rebind = 0;
685 ldc->reason =
"LDAP: connection open successful";
716 for (
i = 0;
i <
srcs->nelts;
i++) {
744 const char *binddn,
const char *bindpw,
769 for (l=
st->connections,
p=
NULL; l; l=l->next) {
774 && ((!l->binddn && !binddn) || (l->binddn && binddn
775 && !
strcmp(l->binddn, binddn)))
776 && ((!l->bindpw && !bindpw) || (l->bindpw && bindpw
777 && !
strcmp(l->bindpw, bindpw)))
778 && (l->deref == deref) && (l->secure ==
secureflag)
781 if (
st->connection_pool_ttl > 0) {
782 if (l->bound && (
now - l->last_backend_conn) >
st->connection_pool_ttl) {
784 "Removing LDAP connection last used %" APR_TIME_T_FMT " seconds ago",
792 l->bound ?
"bound" :
"unbound", l);
810 for (l=
st->connections,
p=
NULL; l; l=l->next) {
816 (l->deref == deref) && (l->secure ==
secureflag) &&
819 if (
st->connection_pool_ttl > 0) {
820 if (l->bound && (
now - l->last_backend_conn) >
st->connection_pool_ttl) {
822 "Removing LDAP connection last used %" APR_TIME_T_FMT " seconds ago",
829 "Reuse %s LDC %pp (will rebind)",
830 l->bound ?
"bound" :
"unbound", l);
861 "util_ldap: Failed to create memory pool");
890 l->ChaseReferrals = dc->ChaseReferrals;
891 l->ReferralHopLimit = dc->ReferralHopLimit;
904 l->keep = (
st->connection_pool_ttl == 0) ? 0 : 1;
906#ifdef USE_APR_LDAP_REBIND
910 "util_ldap: Failed to create memory pool");
947 const char *
url,
const char *dn,
948 const char *
reqdn,
int compare_dn_on_server)
974 if (!compare_dn_on_server) {
977 ldc->reason =
"DN Comparison FALSE (direct strcmp())";
981 ldc->reason =
"DN Comparison TRUE (direct strcmp())";
997 ldc->reason =
"DN Comparison TRUE (cached)";
1022 "(objectclass=*)",
NULL, 1,
1026 ldc->reason =
"DN Comparison ldap_search_ext_s() "
1027 "failed with server down";
1038 ldc->reason =
"DN Comparison ldap_search_ext_s() "
1039 "failed with timeout";
1047 ldc->reason =
"DN Comparison ldap_search_ext_s() failed";
1058 ldc->reason =
"DN Comparison FALSE (checked on server)";
1071 || (
strcmp(dn, node->dn) != 0))
1077 ldc->reason =
"DN Comparison TRUE (checked on server)";
1094 const char *
url,
const char *dn,
1142 ldc->reason =
"Comparison true (cached)";
1145 ldc->reason =
"Comparison false (cached)";
1148 ldc->reason =
"Comparison no such attribute (cached)";
1152 "Comparison undefined: (%d): %s (adding to cache)",
1162 "ldap_compare_s(%pp, %s, %s, %s) = %s (cached)",
1191 ldc->reason =
"ldap_compare_s() failed with server down";
1202 ldc->reason =
"ldap_compare_s() failed with timeout";
1210 ldc->reason =
"Comparison complete";
1238 "cache_compare: Cache insertion failure.");
1249 ldc->reason =
"Comparison true (adding to cache)";
1252 ldc->reason =
"Comparison false (adding to cache)";
1255 ldc->reason =
"Comparison no such attribute (adding to cache)";
1259 "Comparison undefined: (%d): %s (adding to cache)",
1265 "ldap_compare_s(%pp, %s, %s, %s) = %s",
1317 ldc->reason =
"ldap_search_ext_s() for subgroups failed with server"
1329 ldc->reason =
"ldap_search_ext_s() for subgroups failed with timeout";
1338 ldc->reason =
"ldap_search_ext_s() for subgroups failed";
1455 const char *
url,
const char *dn,
1502 ldc->reason =
"DN failed group verification.";
1515 if (curl && curl->compare_cache) {
1539 "Making local copy of SGL for "
1540 "group (%s)(objectClass=%s) ",
1565 "no cached SGL for %s, retrieving from LDAP", dn);
1574 if (curl && curl->compare_cache) {
1598 "Cache entry for %s doesn't exist", dn);
1605 "util_ldap: Couldn't retrieve group entry "
1606 "for %s from cache",
1626 "Copying local SGL of len %d for group %s into cache",
1638 "Copy of SGL failed to obtain shared memory, "
1639 "couldn't update cache");
1658 const char *group =
NULL;
1671 "Found user %s in a subgroup (%s) at level %d of %d.",
1681 "User %s not found in subgroup (%s) at level %d of "
1698 const char *
url,
const char *basedn,
1699 int scope,
char **
attrs,
const char *filter,
1700 const char *bindpw,
const char **binddn,
1703 const char **vals =
NULL;
1764 ldc->reason =
"Authentication successful (cached)";
1794 (
char *)basedn, scope,
1795 (
char *)filter,
attrs, 0,
1799 ldc->reason =
"ldap_search_ext_s() for user failed with server down";
1807 ldc->reason =
"ldap_search_ext_s() for user failed with timeout";
1817 ldc->reason =
"ldap_search_ext_s() for user failed";
1830 ldc->reason =
"User not found";
1832 ldc->reason =
"User is not unique (search found two "
1852 if (!bindpw || strlen(bindpw) <= 0) {
1854 ldc->reason =
"Empty password not allowed";
1868 ldc->reason =
"ldap_simple_bind() to check user credentials "
1869 "failed with server down";
1871 ldc->reason =
"ldap_simple_bind() to check user credentials "
1882 ldc->reason =
"ldap_simple_bind() to check user credentials failed";
1893 ldc->must_rebind = 1;
1963 ldc->reason =
"Authentication successful";
1975 const char *
url,
const char *basedn,
1976 int scope,
char **
attrs,
const char *filter,
1977 const char **binddn,
const char ***
retvals)
1979 const char **vals =
NULL;
2034 ldc->reason =
"Search successful (cached)";
2064 (
char *)basedn, scope,
2065 (
char *)filter,
attrs, 0,
2069 ldc->reason =
"ldap_search_ext_s() for user failed with server down";
2078 ldc->reason =
"ldap_search_ext_s() for user failed";
2091 ldc->reason =
"User not found";
2093 ldc->reason =
"User is not unique (search found two "
2171 ldc->reason =
"Search successful";
2185 return(
st->ssl_supported);
2208 "ldap cache: Setting shared memory cache size to "
2235 "LDAP cache: Setting shared memory cache file to %s.",
2253 st->search_cache_ttl =
atol(
ttl) * 1000000;
2256 "ldap cache: Setting cache TTL to %ld microseconds.",
2257 st->search_cache_ttl);
2275 if (
st->search_cache_size < 0) {
2276 st->search_cache_size = 0;
2280 "ldap cache: Setting search cache size to %ld entries.",
2281 st->search_cache_size);
2301 "ldap cache: Setting operation cache TTL to %ld microseconds.",
2302 st->compare_cache_ttl);
2320 if (
st->compare_cache_size < 0) {
2321 st->compare_cache_size = 0;
2325 "ldap cache: Setting operation cache size to %ld entries.",
2326 st->compare_cache_size);
2444 "not recognised. It should be one "
2445 "of CA_DER, CA_BASE64, CA_CERT7_DB, "
2446 "CA_SECMOD, CERT_DER, CERT_BASE64, "
2447 "CERT_KEY3_DB, CERT_NICKNAME, "
2448 "KEY_DER, KEY_BASE64",
type);
2452 return "Certificate type was not specified.";
2456 "LDAP: SSL trusted global cert - %s (type %s)",
2475 "LDAP: Could not open SSL trusted certificate "
2476 "authority file - %s",
2478 return "Invalid global certificate file path";
2511 "not recognised. It should be one "
2512 "of CA_DER, CA_BASE64, "
2513 "CERT_DER, CERT_BASE64, "
2514 "CERT_NICKNAME, CERT_PFX, "
2515 "KEY_DER, KEY_BASE64, KEY_PFX",
2523 "only valid within a "
2524 "LDAPTrustedGlobalCert directive. "
2525 "Only CA_DER, CA_BASE64, "
2526 "CERT_DER, CERT_BASE64, "
2527 "CERT_NICKNAME, KEY_DER, and "
2528 "KEY_BASE64 may be used.",
type);
2532 return "Certificate type was not specified.";
2536 "LDAP: SSL trusted client cert - %s (type %s)",
2555 "LDAP: Could not open SSL client certificate "
2558 return "Invalid client certificate file path";
2583 "LDAP: SSL trusted mode - %s",
2597 return "Invalid LDAPTrustedMode setting: must be one of NONE, "
2598 "SSL, or TLS/STARTTLS";
2619 "LDAP: SSL verify server certificate - %s",
2620 mode?
"TRUE":
"FALSE");
2622 st->verify_svr_cert =
mode;
2632#ifdef LDAP_OPT_NETWORK_TIMEOUT
2643#ifdef LDAP_OPT_NETWORK_TIMEOUT
2647 "ldap connection: Setting connection timeout to %ld seconds.",
2648 st->connectionTimeout);
2651 "LDAP: Connection timeout option not supported by the "
2652 "LDAP SDK in use." );
2666 "LDAP: Setting referral chasing %s",
arg);
2678 return "LDAPReferrals must be 'on', 'off', or 'default'";
2687#ifdef AP_LDAP_OPT_DEBUG
2698#ifndef AP_LDAP_OPT_DEBUG
2699 return "This directive is not supported with the currently linked LDAP library";
2714 if (dc->ReferralHopLimit <= 0) {
2715 return "LDAPReferralHopLimit must be greater than zero (Use 'LDAPReferrals Off' to disable referral chasing)";
2719 "LDAP: Limit chased referrals to maximum of %d hops.",
2720 dc->ReferralHopLimit);
2755 return "Timeout not numerical";
2758 return "Timeout must be non-negative";
2762 if (!
st->opTimeout) {
2772 "ldap connection: Setting op timeout to %ld seconds.",
2775#ifndef LDAP_OPT_TIMEOUT
2778 "LDAP: LDAP_OPT_TIMEOUT option not supported by the "
2779 "LDAP library in use. Using LDAPTimeout value as search "
2796 if (
val[0] !=
'-' &&
2798 return "LDAPConnectionPoolTTL has wrong format";
2824 return "LDAPRetryDelay has wrong format";
2828 return "LDAPRetryDelay must be >= 0";
2849 if (
st->retries < 0) {
2850 return "LDAPRetries must be >= 0";
2871 st->cache_bytes = 500000;
2873 st->search_cache_size = 1024;
2875 st->compare_cache_size = 1024;
2877 st->ssl_supported = 0;
2881 st->connectionTimeout = 10;
2883 st->opTimeout->tv_sec = 60;
2884 st->verify_svr_cert = 1;
2887 st->retry_delay = 0;
2910 st->cache_bytes =
base->cache_bytes;
2911 st->search_cache_ttl =
base->search_cache_ttl;
2912 st->search_cache_size =
base->search_cache_size;
2913 st->compare_cache_ttl =
base->compare_cache_ttl;
2914 st->compare_cache_size =
base->compare_cache_size;
2917 st->ssl_supported = 0;
2933 st->connectionTimeout =
base->connectionTimeout;
2934 st->opTimeout =
base->opTimeout;
2935 st->verify_svr_cert =
base->verify_svr_cert;
2936 st->debug_level =
base->debug_level;
2941 st->retries =
base->retries;
2942 st->retry_delay =
base->retry_delay;
2951 s->module_config, &ldap_module);
2953 if (
st->ssl_supported) {
2993#if APR_HAS_SHARED_MEMORY
2999 if (
st->cache_file &&
st->cache_bytes > 0) {
3008#if APR_HAS_SHARED_MEMORY
3012 if (!
st->cache_shm) {
3017 "LDAP cache: could not create shared memory segment");
3033 st_vhost->util_ldap_cache =
st->util_ldap_cache;
3034 st_vhost->util_ldap_cache_lock =
st->util_ldap_cache_lock;
3035#if APR_HAS_SHARED_MEMORY
3040 "LDAP merging Shared Cache conf: shm=0x%pp rmm=0x%pp "
3041 "for VHOST: %s",
st->cache_shm,
st->cache_rmm,
3046#if APR_HAS_SHARED_MEMORY
3050 "LDAP cache: LDAPSharedCacheSize is zero, disabling "
3051 "shared memory cache");
3084 st->ssl_supported = 1;
3086 "LDAP: SSL support available" );
3089 st->ssl_supported = 0;
3091 "LDAP: SSL support unavailable%s%s",
3110#ifdef AP_LDAP_OPT_DEBUG
3111 if (
st->debug_level > 0) {
3115 "LDAP: Could not set the LDAP library debug level to %d:(%d) %s",
3130 if (!
st->util_ldap_cache_lock)
return;
3136 "Failed to initialise global mutex %s in child process",
3144 "Set the size of the shared memory cache (in bytes). Use "
3145 "0 to disable the shared memory cache. (default: 500000)"),
3149 "Set the file name for the shared memory cache."),
3153 "Set the maximum number of entries that are possible in the "
3154 "LDAP search cache. Use 0 or -1 to disable the search cache "
3159 "Set the maximum time (in seconds) that an item can be "
3160 "cached in the LDAP search cache. Use 0 for no limit. "
3165 "Set the maximum number of entries that are possible "
3166 "in the LDAP compare cache. Use 0 or -1 to disable the compare cache "
3171 "Set the maximum time (in seconds) that an item is cached "
3172 "in the LDAP operation cache. Use 0 for no limit. "
3177 "Takes three arguments; the first argument is the cert "
3178 "type of the second argument, one of CA_DER, CA_BASE64, "
3179 "CA_CERT7_DB, CA_SECMOD, CERT_DER, CERT_BASE64, CERT_KEY3_DB, "
3180 "CERT_NICKNAME, KEY_DER, or KEY_BASE64. The second argument "
3181 "specifes the file and/or directory containing the trusted CA "
3182 "certificates (and global client certs for Netware) used to "
3183 "validate the LDAP server. The third argument is an optional "
3184 "passphrase if applicable."),
3188 "Takes three arguments: the first argument is the certificate "
3189 "type of the second argument, one of CA_DER, CA_BASE64, "
3190 "CA_CERT7_DB, CA_SECMOD, CERT_DER, CERT_BASE64, CERT_KEY3_DB, "
3191 "CERT_NICKNAME, KEY_DER, or KEY_BASE64. The second argument "
3192 "specifies the file and/or directory containing the client "
3193 "certificate, or certificate ID used to validate this LDAP "
3194 "client. The third argument is an optional passphrase if "
3199 "Specify the type of security that should be applied to "
3200 "an LDAP connection. One of; NONE, SSL or STARTTLS."),
3204 "Set to 'ON' requires that the server certificate be verified"
3205 " before a secure LDAP connection can be establish. Default"
3210 "Specify the LDAP socket connection timeout in seconds "
3215 "Choose whether referrals are chased ['ON'|'OFF'|'DEFAULT']. Default 'ON'"),
3219 "Limit the number of referral hops that LDAP can follow. "
3220 "(Integer value, Consult LDAP SDK documentation for applicability and defaults"),
3224 "Enable debugging in LDAP SDK (Default: off, values: SDK specific"),
3228 "Specify the LDAP bind/search timeout in seconds "
3229 "(0 = no limit). Default: 60"),
3232 "Specify the maximum amount of time a bound connection can sit "
3233 "idle and still be considered valid for reuse"
3234 "(0 = no pool, -1 = no limit, n = time in seconds). Default: -1"),
3237 "Specify the number of times a failed LDAP operation should be retried "
3238 "(0 = no retries). Default: 3"),
3241 "Specify the delay between retries of a failed LDAP operation "
3242 "(0 = no delay). Default: 0"),
const char apr_size_t len
char * strdup(const char *str)
apr_size_t const unsigned char unsigned int unsigned int d
apr_array_append(apr_pool_t *p, const apr_array_header_t *first, const apr_array_header_t *second)
apr_array_copy_hdr(apr_pool_t *p, const apr_array_header_t *arr)
static apr_pool_t * pconf
#define AP_INIT_TAKE1(directive, func, mconfig, where, help)
#define ap_get_module_config(v, m)
void ap_hook_post_config(ap_HOOK_post_config_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
#define AP_DECLARE_MODULE(foo)
#define AP_INIT_FLAG(directive, func, mconfig, where, help)
char * ap_server_root_relative(apr_pool_t *p, const char *fname)
void ap_hook_handler(ap_HOOK_handler_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_pre_config(ap_HOOK_pre_config_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
request_rec int int apr_table_t const char * path
void ap_hook_child_init(ap_HOOK_child_init_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
#define AP_INIT_TAKE23(directive, func, mconfig, where, help)
#define AP_SQ_MS_CREATE_PRE_CONFIG
int ap_state_query(int query_code)
apr_status_t ap_global_mutex_create(apr_global_mutex_t **mutex, const char **name, const char *type, const char *instance_id, server_rec *server, apr_pool_t *pool, apr_int32_t options)
apr_status_t ap_mutex_register(apr_pool_t *pconf, const char *type, const char *default_dir, apr_lockmech_e default_mech, apr_int32_t options)
static APR_INLINE int ap_rputs(const char *str, request_rec *r)
void ap_set_content_type_ex(request_rec *r, const char *ct, int trusted)
const char apr_port_t port
apr_pool_t apr_dbd_t apr_dbd_results_t ** res
apr_dbd_transaction_t int mode
apr_pool_t const char * params
const char apr_hash_t ** values
#define APR_REGISTER_OPTIONAL_FN(name)
#define STANDARD20_MODULE_STUFF
apr_status_t ap_timeout_parameter_parse(const char *timeout_parameter, apr_interval_time_t *timeout, const char *default_time_unit)
const char * ap_check_cmd_context(cmd_parms *cmd, unsigned forbidden)
const char apr_file_t * file
apr_array_header_t ** result
int strcasecmp(const char *a, const char *b)
#define apr_pool_create(newpool, parent)
#define apr_pcalloc(p, size)
const void apr_size_t bytes
const char const char * password
apr_int32_t apr_int32_t apr_int32_t err
apr_int64_t apr_interval_time_t
A structure that represents the current request.
struct ap_conf_vector_t * per_dir_config
A structure to store information for each virtual server.
struct ap_conf_vector_t * module_config
#define AP_LDAP_CHASEREFERRALS_OFF
static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
static const char * util_ldap_set_retries(cmd_parms *cmd, void *dummy, const char *val)
static void util_ldap_child_init(apr_pool_t *p, server_rec *s)
static void * util_ldap_merge_config(apr_pool_t *p, void *basev, void *overridesv)
static int uldap_ld_errno(util_ldap_connection_t *ldc)
#define AP_LDAP_CHASEREFERRALS_SDKDEFAULT
#define APR_LDAP_SIZELIMIT
#define AP_LDAP_CONNPOOL_DEFAULT
static const char * util_ldap_set_trusted_mode(cmd_parms *cmd, void *dummy, const char *mode)
#define AP_LDAP_CHASEREFERRALS_ON
#define AP_LDAP_CONNPOOL_INFINITE
static int uldap_cache_check_subgroups(request_rec *r, util_ldap_connection_t *ldc, const char *url, const char *dn, const char *attrib, const char *value, char **subgroupAttrs, apr_array_header_t *subgroupclasses, int cur_subgroup_depth, int max_subgroup_depth)
static const command_rec util_ldap_cmds[]
static apr_status_t util_ldap_cleanup_module(void *data)
static int compare_client_certs(apr_array_header_t *srcs, apr_array_header_t *dests)
static const char * ldap_cache_mutex_type
static apr_status_t uldap_connection_unbind(void *param)
static int uldap_cache_comparedn(request_rec *r, util_ldap_connection_t *ldc, const char *url, const char *dn, const char *reqdn, int compare_dn_on_server)
static void * util_ldap_create_dir_config(apr_pool_t *p, char *d)
static const char * util_ldap_set_debug_level(cmd_parms *cmd, void *config, const char *arg)
static const char * util_ldap_set_verify_srv_cert(cmd_parms *cmd, void *dummy, int mode)
static const char * util_ldap_set_referral_hop_limit(cmd_parms *cmd, void *config, const char *hop_limit)
static int uldap_cache_compare(request_rec *r, util_ldap_connection_t *ldc, const char *url, const char *dn, const char *attrib, const char *value)
static APR_INLINE apr_status_t ldap_cache_lock(util_ldap_state_t *st, request_rec *r)
static void util_ldap_register_hooks(apr_pool_t *p)
static const char * util_ldap_set_retry_delay(cmd_parms *cmd, void *dummy, const char *val)
static void * util_ldap_create_config(apr_pool_t *p, server_rec *s)
static const char * util_ldap_set_cache_ttl(cmd_parms *cmd, void *dummy, const char *ttl)
static void uldap_connection_close(util_ldap_connection_t *ldc)
static int util_ldap_handler(request_rec *r)
#define AP_LDAP_HOPLIMIT_UNSET
static int uldap_ssl_supported(request_rec *r)
static int util_ldap_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
static int uldap_connection_init(request_rec *r, util_ldap_connection_t *ldc)
static const char * util_ldap_set_conn_ttl(cmd_parms *cmd, void *dummy, const char *val)
static void util_ldap_strdup(char **str, const char *newstr)
static const char * util_ldap_set_trusted_client_cert(cmd_parms *cmd, void *config, const char *type, const char *file, const char *password)
static int uldap_simple_bind(util_ldap_connection_t *ldc, char *binddn, char *bindpw, struct timeval *timeout)
#define uldap_rebind_add(ldc)
static util_ldap_connection_t * uldap_connection_find(request_rec *r, const char *host, int port, const char *binddn, const char *bindpw, deref_options deref, int secure)
static const char * util_ldap_set_chase_referrals(cmd_parms *cmd, void *config, const char *arg)
static int util_ldap_parse_cert_type(const char *type)
static const char * util_ldap_set_op_timeout(cmd_parms *cmd, void *dummy, const char *val)
static int uldap_connection_open(request_rec *r, util_ldap_connection_t *ldc)
static util_compare_subgroup_t * uldap_get_subgroups(request_rec *r, util_ldap_connection_t *ldc, const char *url, const char *dn, char **subgroupAttrs, apr_array_header_t *subgroupclasses)
static const char * util_ldap_set_opcache_entries(cmd_parms *cmd, void *dummy, const char *size)
static const char * util_ldap_set_cache_file(cmd_parms *cmd, void *dummy, const char *file)
static const char * util_ldap_set_cache_bytes(cmd_parms *cmd, void *dummy, const char *bytes)
#define uldap_rebind_init(p)
static const char * util_ldap_set_connection_timeout(cmd_parms *cmd, void *dummy, const char *ttl)
static int uldap_cache_checkuserid(request_rec *r, util_ldap_connection_t *ldc, const char *url, const char *basedn, int scope, char **attrs, const char *filter, const char *bindpw, const char **binddn, const char ***retvals)
static const char * util_ldap_set_opcache_ttl(cmd_parms *cmd, void *dummy, const char *ttl)
static int uldap_cache_getuserdn(request_rec *r, util_ldap_connection_t *ldc, const char *url, const char *basedn, int scope, char **attrs, const char *filter, const char **binddn, const char ***retvals)
static const char * util_ldap_set_cache_entries(cmd_parms *cmd, void *dummy, const char *size)
static APR_INLINE apr_status_t ldap_cache_unlock(util_ldap_state_t *st, request_rec *r)
static const char * util_ldap_set_trusted_global_cert(cmd_parms *cmd, void *dummy, const char *type, const char *file, const char *password)
This switches LDAP support on or off.
Apache Mutex support library.