summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-04-25 17:00:50 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-05-02 08:10:17 -0400
commitc3f4aaa1a26035d05e60238d3e2df7fb4429ae28 (patch)
treecb27367716fa4afe5a28200bf0b1051b8e6be844
parent067379e78f2295462be246d8ecafb1c693b4a5f7 (diff)
downloadsssd-c3f4aaa1a26035d05e60238d3e2df7fb4429ae28.tar.gz
sssd-c3f4aaa1a26035d05e60238d3e2df7fb4429ae28.tar.xz
sssd-c3f4aaa1a26035d05e60238d3e2df7fb4429ae28.zip
RESPONDER: check return value from confdb_get_int
sss_process_init forgot to check return value of confdb_get_int
-rw-r--r--src/responder/common/responder_common.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c
index 2c1ae28be..faff0febd 100644
--- a/src/responder/common/responder_common.c
+++ b/src/responder/common/responder_common.c
@@ -548,6 +548,13 @@ int sss_process_init(TALLOC_CTX *mem_ctx,
ret = confdb_get_int(rctx->cdb, rctx->confdb_service_path,
CONFDB_RESPONDER_GET_DOMAINS_TIMEOUT,
GET_DOMAINS_DEFAULT_TIMEOUT, &rctx->domains_timeout);
+ if (ret != EOK) {
+ DEBUG(SSSDBG_OP_FAILURE,
+ ("Cannnot get the default domain timeout [%d]: %s\n",
+ ret, strerror(ret)));
+ return ret;
+ }
+
if (rctx->domains_timeout < 0) {
DEBUG(SSSDBG_CONF_SETTINGS, ("timeout can't be set to negative value, setting default\n"));
rctx->domains_timeout = GET_DOMAINS_DEFAULT_TIMEOUT;