summaryrefslogtreecommitdiffstats
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:50:58 -0400
commitfc28a2fa97feab70492b36afcc058d6b3fb52d79 (patch)
tree7f4540c19ac25c3e38e1f22714b917598b8119c2 /src/providers
parentc989a15469e72a479c7c689bf830adf78ec76c99 (diff)
downloadsssd-fc28a2fa97feab70492b36afcc058d6b3fb52d79.tar.gz
sssd-fc28a2fa97feab70492b36afcc058d6b3fb52d79.tar.xz
sssd-fc28a2fa97feab70492b36afcc058d6b3fb52d79.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 482f74446..cbdb78624 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;