From 823e81272345e2b4cc6b045fb7fc258af2da281f Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 10 Jan 2011 09:27:58 -0500 Subject: [PATCH] Add NETWORK_TIMEOUT as an alias for BIND_TIMELIMIT for compatibility with OpenLDAP ldap.conf files. --- NEWS | 3 +++ doc/sudoers.ldap.pod | 4 ++++ plugins/sudoers/ldap.c | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/NEWS b/NEWS index de2fe9ebb..852948120 100644 --- a/NEWS +++ b/NEWS @@ -73,6 +73,9 @@ What's new in Sudo 1.7.5? * Fixed a crash when the -g flag was used without the -u flag and a sudoers entry did not contain a Runas_Spec. + * NETWORK_TIMEOUT is now an alias for BIND_TIMELIMIT in ldap.conf for + compatibility with OpenLDAP configuration files. + What's new in Sudo 1.7.4p4? * A potential security issue has been fixed with respect to the handling diff --git a/doc/sudoers.ldap.pod b/doc/sudoers.ldap.pod index 6341b16a9..89409cb7b 100644 --- a/doc/sudoers.ldap.pod +++ b/doc/sudoers.ldap.pod @@ -326,6 +326,10 @@ to wait while trying to connect to an LDAP server. If multiple Bs or Bs are specified, this is the amount of time to wait before trying the next one in the list. +=item B seconds + +An alias for B. + =item B seconds The B parameter specifies the amount of time, in seconds, diff --git a/plugins/sudoers/ldap.c b/plugins/sudoers/ldap.c index a1091c756..85020fded 100644 --- a/plugins/sudoers/ldap.c +++ b/plugins/sudoers/ldap.c @@ -261,9 +261,13 @@ static struct ldap_config_table ldap_conf_table[] = { #ifdef LDAP_OPT_NETWORK_TIMEOUT { "bind_timelimit", CONF_INT, TRUE, -1 /* needs timeval, set manually */, &ldap_conf.bind_timelimit }, + { "network_timeout", CONF_INT, TRUE, -1 /* needs timeval, set manually */, + &ldap_conf.bind_timelimit }, #elif defined(LDAP_X_OPT_CONNECT_TIMEOUT) { "bind_timelimit", CONF_INT, TRUE, LDAP_X_OPT_CONNECT_TIMEOUT, &ldap_conf.bind_timelimit }, + { "network_timeout", CONF_INT, TRUE, LDAP_X_OPT_CONNECT_TIMEOUT, + &ldap_conf.bind_timelimit }, #endif { "timelimit", CONF_INT, TRUE, LDAP_OPT_TIMELIMIT, &ldap_conf.timelimit }, { "binddn", CONF_STR, FALSE, -1, &ldap_conf.binddn }, -- 2.40.0