summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-10-05 08:18:44 -0400
committerSimo Sorce <ssorce@redhat.com>2009-10-09 16:10:55 -0400
commit1f2b3f82f9896a99f8f2b8b2145af47402a9c3c6 (patch)
tree062300d45f2fd9a11862f913d3ec45c85abc613b /server
parent80bf7e699e375645c9a12a6ac4b0bc0155d8e778 (diff)
downloadsssd-1f2b3f82f9896a99f8f2b8b2145af47402a9c3c6.tar.gz
sssd-1f2b3f82f9896a99f8f2b8b2145af47402a9c3c6.tar.bz2
sssd-1f2b3f82f9896a99f8f2b8b2145af47402a9c3c6.zip
Differentiate between search and network timeouts
Network timeouts are used in quick operations like bind. Search timeout is used for operations that can "legally" require more time. Change defaults to 6 and 60 seconds respectively.
Diffstat (limited to 'server')
-rw-r--r--server/providers/ldap/sdap.c5
-rw-r--r--server/providers/ldap/sdap.h1
-rw-r--r--server/providers/ldap/sdap_async.c6
3 files changed, 7 insertions, 5 deletions
diff --git a/server/providers/ldap/sdap.c b/server/providers/ldap/sdap.c
index b2dc6f6f..47f76f9c 100644
--- a/server/providers/ldap/sdap.c
+++ b/server/providers/ldap/sdap.c
@@ -36,8 +36,9 @@ struct sdap_gen_opts default_basic_opts[] = {
{ "ldap_default_bind_dn", SDAP_STRING, NULL_STRING, NULL_STRING },
{ "ldap_default_authtok_type", SDAP_STRING, NULL_STRING, NULL_STRING},
{ "ldap_default_authtok", SDAP_BLOB, NULL_BLOB, NULL_BLOB },
- { "ldap_network_timeout", SDAP_NUMBER, { .number = 60 }, NULL_NUMBER },
- { "ldap_opt_timeout", SDAP_NUMBER, { .number = 60 }, NULL_NUMBER },
+ { "ldap_search_timeout", SDAP_NUMBER, { .number = 60 }, NULL_NUMBER },
+ { "ldap_network_timeout", SDAP_NUMBER, { .number = 6 }, NULL_NUMBER },
+ { "ldap_opt_timeout", SDAP_NUMBER, { .number = 6 }, NULL_NUMBER },
{ "ldap_tls_reqcert", SDAP_STRING, { "hard" }, NULL_STRING },
{ "ldap_user_search_base", SDAP_STRING, { "ou=People,dc=example,dc=com" }, NULL_STRING },
{ "ldap_user_search_scope", SDAP_STRING, { "sub" }, NULL_STRING },
diff --git a/server/providers/ldap/sdap.h b/server/providers/ldap/sdap.h
index 92771dea..3aa29a37 100644
--- a/server/providers/ldap/sdap.h
+++ b/server/providers/ldap/sdap.h
@@ -75,6 +75,7 @@ enum sdap_basic_opt {
SDAP_DEFAULT_BIND_DN,
SDAP_DEFAULT_AUTHTOK_TYPE,
SDAP_DEFAULT_AUTHTOK,
+ SDAP_SEARCH_TIMEOUT,
SDAP_NETWORK_TIMEOUT,
SDAP_OPT_TIMEOUT,
SDAP_TLS_REQCERT,
diff --git a/server/providers/ldap/sdap_async.c b/server/providers/ldap/sdap_async.c
index 6fd2837b..80b7e046 100644
--- a/server/providers/ldap/sdap_async.c
+++ b/server/providers/ldap/sdap_async.c
@@ -1966,7 +1966,7 @@ static void sdap_get_users_transaction(struct tevent_req *subreq)
ret = sdap_op_add(state, state->ev, state->sh, msgid,
sdap_get_users_done, req,
sdap_go_get_int(state->opts->basic,
- SDAP_NETWORK_TIMEOUT),
+ SDAP_SEARCH_TIMEOUT),
&state->op);
if (ret) {
DEBUG(1, ("Failed to set up operation!\n"));
@@ -2193,7 +2193,7 @@ static void sdap_get_groups_transaction(struct tevent_req *subreq)
ret = sdap_op_add(state, state->ev, state->sh, msgid,
sdap_get_groups_done, req,
sdap_go_get_int(state->opts->basic,
- SDAP_NETWORK_TIMEOUT),
+ SDAP_SEARCH_TIMEOUT),
&state->op);
if (ret) {
DEBUG(1, ("Failed to set up operation!\n"));
@@ -2528,7 +2528,7 @@ static void sdap_get_initgr_transaction(struct tevent_req *subreq)
ret = sdap_op_add(state, state->ev, state->sh, msgid,
sdap_get_initgr_done, req,
sdap_go_get_int(state->opts->basic,
- SDAP_NETWORK_TIMEOUT),
+ SDAP_SEARCH_TIMEOUT),
&state->op);
if (ret) {
DEBUG(1, ("Failed to set up operation!\n"));