summaryrefslogtreecommitdiff
path: root/src/providers
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-04-26 13:02:04 -0400
committerStephen Gallagher <sgallagh@redhat.com>2010-04-30 07:51:19 -0400
commit83bc461f812b3c3df260b5f75d84b34bb1135062 (patch)
tree7a0a98cedea387a575e1c7410a308bb28c098b28 /src/providers
parent01c94127cf0fd72b6db828f1830fff1e5ed55bd1 (diff)
downloadsssd-83bc461f812b3c3df260b5f75d84b34bb1135062.tar.gz
sssd-83bc461f812b3c3df260b5f75d84b34bb1135062.tar.bz2
sssd-83bc461f812b3c3df260b5f75d84b34bb1135062.zip
Add dns_resolver_timeout option
We had a hard-coded timeout of five seconds for DNS lookups in the async resolver. This patch adds an option 'dns_resolver_timeout' to specify this value (Default: 5)
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/data_provider_fo.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/providers/data_provider_fo.c b/src/providers/data_provider_fo.c
index 482f7444..cbdb7862 100644
--- a/src/providers/data_provider_fo.c
+++ b/src/providers/data_provider_fo.c
@@ -93,6 +93,7 @@ static int be_fo_get_options(TALLOC_CTX *mem_ctx, struct be_ctx *ctx,
int be_init_failover(struct be_ctx *ctx)
{
int ret;
+ int fo_timeout;
struct fo_options fopts;
if (ctx->be_fo != NULL) {
@@ -104,7 +105,14 @@ int be_init_failover(struct be_ctx *ctx)
return ENOMEM;
}
- ret = resolv_init(ctx, ctx->ev, 5, &ctx->be_fo->resolv);
+ ret = confdb_get_int(ctx->cdb, ctx, ctx->conf_path,
+ CONFDB_DOMAIN_RESOLV_TIMEOUT,
+ 5, &fo_timeout);
+ if (ret != EOK) {
+ return ret;
+ }
+
+ ret = resolv_init(ctx, ctx->ev, fo_timeout, &ctx->be_fo->resolv);
if (ret != EOK) {
talloc_zfree(ctx->be_fo);
return ret;