ASF Bugzilla – Attachment 20300 Details for
Bug 42557
Missing parameter to control LDAP referral chasing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch to enhance functionality
apache-2.2.4-mod_ldap.patch (text/plain), 2.98 KB, created by
Massimiliano Calandrelli
on 2007-05-31 08:39:27 UTC
(
hide
)
Description:
Proposed patch to enhance functionality
Filename:
MIME Type:
Creator:
Massimiliano Calandrelli
Created:
2007-05-31 08:39:27 UTC
Size:
2.98 KB
patch
obsolete
>diff -ru httpd-2.2.4/include/util_ldap.h httpd-2.2.4.new/include/util_ldap.h >--- httpd-2.2.4/include/util_ldap.h 2007-05-31 16:52:41.000000000 +0200 >+++ httpd-2.2.4.new/include/util_ldap.h 2007-05-31 16:51:02.000000000 +0200 >@@ -105,7 +105,7 @@ > struct util_ldap_connection_t *next; > } util_ldap_connection_t; > >-/* LDAP cache state information */ >+/* LDAP cache state information */ > typedef struct util_ldap_state_t { > apr_pool_t *pool; /* pool from which this state is allocated */ > #if APR_HAS_THREADS >@@ -137,6 +137,7 @@ > char *lock_file; /* filename for shm lock mutex */ > long connectionTimeout; > int verify_svr_cert; >+ int chase_referrals; > > } util_ldap_state_t; > >diff -ru httpd-2.2.4/modules/ldap/util_ldap.c httpd-2.2.4.new/modules/ldap/util_ldap.c >--- httpd-2.2.4/modules/ldap/util_ldap.c 2007-05-31 16:52:41.000000000 +0200 >+++ httpd-2.2.4.new/modules/ldap/util_ldap.c 2007-05-31 17:36:44.000000000 +0200 >@@ -241,6 +241,9 @@ > /* always default to LDAP V3 */ > ldap_set_option(ldc->ldap, LDAP_OPT_PROTOCOL_VERSION, &version); > >+ /* referrals */ >+ ldap_set_option(ldc->ldap, LDAP_OPT_REFERRALS, st->chase_referrals ? LDAP_OPT_ON : LDAP_OPT_OFF); >+ > /* set client certificates */ > if (!apr_is_empty_array(ldc->client_certs)) { > apr_ldap_set_option(ldc->pool, ldc->ldap, APR_LDAP_OPT_TLS_CERT, >@@ -865,6 +868,7 @@ > util_search_node_t the_search_node; > apr_time_t curtime; > >+ > util_ldap_state_t *st = > (util_ldap_state_t *)ap_get_module_config(r->server->module_config, > &ldap_module); >@@ -1735,6 +1739,29 @@ > } > > >+static const char *util_ldap_set_chase_referrals(cmd_parms *cmd, >+ void *dummy, >+ int mode) >+{ >+ util_ldap_state_t *st = >+ (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config, >+ &ldap_module); >+ const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); >+ >+ if (err != NULL) { >+ return err; >+ } >+ >+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, >+ "LDAP: chase referrals - %s", >+ mode?"TRUE":"FALSE"); >+ >+ st->chase_referrals = mode; >+ >+ return(NULL); >+} >+ >+ > static const char *util_ldap_set_connection_timeout(cmd_parms *cmd, > void *dummy, > const char *ttl) >@@ -1790,7 +1817,7 @@ > st->secure_set = 0; > st->connectionTimeout = 10; > st->verify_svr_cert = 1; >- >+ st->chase_referrals = 1; > return st; > } > >@@ -2087,6 +2114,10 @@ > "Specify the LDAP socket connection timeout in seconds " > "(default: 10)"), > >+ AP_INIT_FLAG("LDAPChaseReferrals", util_ldap_set_chase_referrals, >+ NULL, RSRC_CONF, >+ "Set to 'ON' requires that LDAP referrals are searched. Default 'ON'"), >+ > {NULL} > }; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 42557
: 20300