From a530a96721d8106a6839b6b643b0abc5d7a7b9e0 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Wed, 12 Jan 2011 11:31:24 +0100 Subject: Add timeout parameter to sdap_get_generic_send() --- src/providers/ipa/ipa_access.c | 53 ++++++++++++++++++++++++------------------ src/providers/ipa/ipa_auth.c | 4 +++- 2 files changed, 34 insertions(+), 23 deletions(-) (limited to 'src/providers/ipa') diff --git a/src/providers/ipa/ipa_access.c b/src/providers/ipa/ipa_access.c index c66bb9c8b..61caef10e 100644 --- a/src/providers/ipa/ipa_access.c +++ b/src/providers/ipa/ipa_access.c @@ -535,14 +535,17 @@ struct tevent_req *hbac_get_service_data_send(TALLOC_CTX *memctx, goto fail; } subreq = sdap_get_generic_send(state, - hbac_ctx_ev(state->hbac_ctx), - hbac_ctx_sdap_id_ctx(state->hbac_ctx)->opts, - sdap_handle, - state->services_search_base, - LDAP_SCOPE_SUB, - state->services_filter, - state->services_attrs, - NULL, 0); + hbac_ctx_ev(state->hbac_ctx), + hbac_ctx_sdap_id_ctx(state->hbac_ctx)->opts, + sdap_handle, + state->services_search_base, + LDAP_SCOPE_SUB, + state->services_filter, + state->services_attrs, + NULL, 0, + dp_opt_get_int( + hbac_ctx_sdap_id_ctx(state->hbac_ctx)->opts->basic, + SDAP_SEARCH_TIMEOUT)); if (subreq == NULL) { DEBUG(1, ("sdap_get_generic_send failed.\n")); @@ -830,13 +833,16 @@ static struct tevent_req *hbac_get_host_info_send(TALLOC_CTX *memctx, goto fail; } subreq = sdap_get_generic_send(state, hbac_ctx_ev(state->hbac_ctx), - hbac_ctx_sdap_id_ctx(state->hbac_ctx)->opts, - sdap_handle, - state->host_search_base, - LDAP_SCOPE_SUB, - state->host_filter, - state->host_attrs, - NULL, 0); + hbac_ctx_sdap_id_ctx(state->hbac_ctx)->opts, + sdap_handle, + state->host_search_base, + LDAP_SCOPE_SUB, + state->host_filter, + state->host_attrs, + NULL, 0, + dp_opt_get_int( + hbac_ctx_sdap_id_ctx(state->hbac_ctx)->opts->basic, + SDAP_SEARCH_TIMEOUT)); if (subreq == NULL) { DEBUG(1, ("sdap_get_generic_send failed.\n")); @@ -1148,13 +1154,16 @@ static struct tevent_req *hbac_get_rules_send(TALLOC_CTX *memctx, goto fail; } subreq = sdap_get_generic_send(state, hbac_ctx_ev(state->hbac_ctx), - hbac_ctx_sdap_id_ctx(state->hbac_ctx)->opts, - sdap_handle, - state->hbac_search_base, - LDAP_SCOPE_SUB, - state->hbac_filter, - state->hbac_attrs, - NULL, 0); + hbac_ctx_sdap_id_ctx(state->hbac_ctx)->opts, + sdap_handle, + state->hbac_search_base, + LDAP_SCOPE_SUB, + state->hbac_filter, + state->hbac_attrs, + NULL, 0, + dp_opt_get_int( + hbac_ctx_sdap_id_ctx(state->hbac_ctx)->opts->basic, + SDAP_SEARCH_TIMEOUT)); if (subreq == NULL) { DEBUG(1, ("sdap_get_generic_send failed.\n")); diff --git a/src/providers/ipa/ipa_auth.c b/src/providers/ipa/ipa_auth.c index 020b63f3a..eb7f2917e 100644 --- a/src/providers/ipa/ipa_auth.c +++ b/src/providers/ipa/ipa_auth.c @@ -153,7 +153,9 @@ static void get_password_migration_flag_auth_done(struct tevent_req *subreq) subreq = sdap_get_generic_send(state, state->ev, state->sdap_auth_ctx->opts, state->sh, search_base, LDAP_SCOPE_SUBTREE, - IPA_CONFIG_FILTER, attrs, NULL, 0); + IPA_CONFIG_FILTER, attrs, NULL, 0, + dp_opt_get_int(state->sdap_auth_ctx->opts->basic, + SDAP_SEARCH_TIMEOUT)); if (!subreq) { tevent_req_error(req, ENOMEM); return; -- cgit