summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2011-12-14 07:20:11 -0500
committerStephen Gallagher <sgallagh@redhat.com>2012-02-21 21:28:49 -0500
commit3bea01f01d76e1e95a8239c0d3f67073992136a1 (patch)
tree5da8c3f66905726489fcffba5934db221f6dbed4
parent3e5caddf4840e40b49ccf24e1ce7b531a692023b (diff)
downloadsssd-3bea01f01d76e1e95a8239c0d3f67073992136a1.tar.gz
sssd-3bea01f01d76e1e95a8239c0d3f67073992136a1.tar.bz2
sssd-3bea01f01d76e1e95a8239c0d3f67073992136a1.zip
Don't give memory context in confdb where not needed
-rw-r--r--src/confdb/confdb.c45
-rw-r--r--src/confdb/confdb.h4
-rw-r--r--src/db/sysdb_ops.c6
-rw-r--r--src/monitor/monitor.c8
-rw-r--r--src/monitor/monitor_sbus.c2
-rw-r--r--src/providers/data_provider_fo.c7
-rw-r--r--src/providers/data_provider_opts.c4
-rw-r--r--src/providers/ipa/ipa_dyndns.c2
-rw-r--r--src/providers/ldap/ldap_common.c2
-rw-r--r--src/responder/autofs/autofssrv.c4
-rw-r--r--src/responder/nss/nsssrv.c12
-rw-r--r--src/responder/pam/pamsrv.c8
-rw-r--r--src/responder/pam/pamsrv_cmd.c4
-rw-r--r--src/responder/ssh/sshsrv.c2
-rw-r--r--src/responder/sudo/sudosrv.c6
-rw-r--r--src/tools/sss_sync_ops.c6
-rw-r--r--src/util/server.c8
17 files changed, 75 insertions, 55 deletions
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
index 57023f29..04f02b5c 100644
--- a/src/confdb/confdb.c
+++ b/src/confdb/confdb.c
@@ -337,15 +337,22 @@ failed:
return ret;
}
-int confdb_get_int(struct confdb_ctx *cdb, TALLOC_CTX *ctx,
+int confdb_get_int(struct confdb_ctx *cdb,
const char *section, const char *attribute,
int defval, int *result)
{
char **values = NULL;
long val;
int ret;
+ TALLOC_CTX *tmp_ctx;
- ret = confdb_get_param(cdb, ctx, section, attribute, &values);
+ tmp_ctx = talloc_new(NULL);
+ if (tmp_ctx == NULL) {
+ ret = ENOMEM;
+ goto failed;
+ }
+
+ ret = confdb_get_param(cdb, tmp_ctx, section, attribute, &values);
if (ret != EOK) {
goto failed;
}
@@ -373,27 +380,34 @@ int confdb_get_int(struct confdb_ctx *cdb, TALLOC_CTX *ctx,
val = defval;
}
- talloc_free(values);
+ talloc_free(tmp_ctx);
*result = (int)val;
return EOK;
failed:
- talloc_free(values);
+ talloc_free(tmp_ctx);
DEBUG(1, ("Failed to read [%s] from [%s], error [%d] (%s)\n",
attribute, section, ret, strerror(ret)));
return ret;
}
-long confdb_get_long(struct confdb_ctx *cdb, TALLOC_CTX *ctx,
+long confdb_get_long(struct confdb_ctx *cdb,
const char *section, const char *attribute,
long defval, long *result)
{
char **values = NULL;
long val;
int ret;
+ TALLOC_CTX *tmp_ctx;
- ret = confdb_get_param(cdb, ctx, section, attribute, &values);
+ tmp_ctx = talloc_new(NULL);
+ if (tmp_ctx == NULL) {
+ ret = ENOMEM;
+ goto failed;
+ }
+
+ ret = confdb_get_param(cdb, tmp_ctx, section, attribute, &values);
if (ret != EOK) {
goto failed;
}
@@ -416,27 +430,34 @@ long confdb_get_long(struct confdb_ctx *cdb, TALLOC_CTX *ctx,
val = defval;
}
- talloc_free(values);
+ talloc_free(tmp_ctx);
*result = val;
return EOK;
failed:
- talloc_free(values);
+ talloc_free(tmp_ctx);
DEBUG(1, ("Failed to read [%s] from [%s], error [%d] (%s)\n",
attribute, section, ret, strerror(ret)));
return ret;
}
-int confdb_get_bool(struct confdb_ctx *cdb, TALLOC_CTX *ctx,
+int confdb_get_bool(struct confdb_ctx *cdb,
const char *section, const char *attribute,
bool defval, bool *result)
{
char **values = NULL;
bool val;
int ret;
+ TALLOC_CTX *tmp_ctx;
- ret = confdb_get_param(cdb, ctx, section, attribute, &values);
+ tmp_ctx = talloc_new(NULL);
+ if (tmp_ctx == NULL) {
+ ret = ENOMEM;
+ goto failed;
+ }
+
+ ret = confdb_get_param(cdb, tmp_ctx, section, attribute, &values);
if (ret != EOK) {
goto failed;
}
@@ -465,13 +486,13 @@ int confdb_get_bool(struct confdb_ctx *cdb, TALLOC_CTX *ctx,
val = defval;
}
- talloc_free(values);
+ talloc_free(tmp_ctx);
*result = val;
return EOK;
failed:
- talloc_free(values);
+ talloc_free(tmp_ctx);
DEBUG(1, ("Failed to read [%s] from [%s], error [%d] (%s)\n",
attribute, section, ret, strerror(ret)));
return ret;
diff --git a/src/confdb/confdb.h b/src/confdb/confdb.h
index 819e8ff3..18484f02 100644
--- a/src/confdb/confdb.h
+++ b/src/confdb/confdb.h
@@ -343,7 +343,7 @@ int confdb_get_string(struct confdb_ctx *cdb, TALLOC_CTX *ctx,
* @return ERANGE - The value stored in the ConfDB was outside the range
* [INT_MIN..INT_MAX]
*/
-int confdb_get_int(struct confdb_ctx *cdb, TALLOC_CTX *ctx,
+int confdb_get_int(struct confdb_ctx *cdb,
const char *section, const char *attribute,
int defval, int *result);
@@ -372,7 +372,7 @@ int confdb_get_int(struct confdb_ctx *cdb, TALLOC_CTX *ctx,
* single-valued, or the value was not a boolean.
* @return EIO - An I/O error occurred while communicating with the ConfDB
*/
-int confdb_get_bool(struct confdb_ctx *cdb, TALLOC_CTX *ctx,
+int confdb_get_bool(struct confdb_ctx *cdb,
const char *section, const char *attribute,
bool defval, bool *result);
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 41070843..7606b8f0 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -2487,7 +2487,7 @@ errno_t check_failed_login_attempts(struct confdb_ctx *cdb,
SYSDB_FAILED_LOGIN_ATTEMPTS, 0);
last_failed_login = (time_t) ldb_msg_find_attr_as_int64(ldb_msg,
SYSDB_LAST_FAILED_LOGIN, 0);
- ret = confdb_get_int(cdb, tmp_ctx, CONFDB_PAM_CONF_ENTRY,
+ ret = confdb_get_int(cdb, CONFDB_PAM_CONF_ENTRY,
CONFDB_PAM_FAILED_LOGIN_ATTEMPTS,
CONFDB_DEFAULT_PAM_FAILED_LOGIN_ATTEMPTS,
&allowed_failed_login_attempts);
@@ -2497,7 +2497,7 @@ errno_t check_failed_login_attempts(struct confdb_ctx *cdb,
ret = EIO;
goto done;
}
- ret = confdb_get_int(cdb, tmp_ctx, CONFDB_PAM_CONF_ENTRY,
+ ret = confdb_get_int(cdb, CONFDB_PAM_CONF_ENTRY,
CONFDB_PAM_FAILED_LOGIN_DELAY,
CONFDB_DEFAULT_PAM_FAILED_LOGIN_DELAY,
&failed_login_delay);
@@ -2612,7 +2612,7 @@ int sysdb_cache_auth(struct sysdb_ctx *sysdb,
SYSDB_LAST_ONLINE_AUTH,
0);
- ret = confdb_get_int(cdb, tmp_ctx, CONFDB_PAM_CONF_ENTRY,
+ ret = confdb_get_int(cdb, CONFDB_PAM_CONF_ENTRY,
CONFDB_PAM_CRED_TIMEOUT, 0, &cred_expiration);
if (ret != EOK) {
DEBUG(1, ("Failed to read expiration time of offline credentials.\n"));
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
index 5293a345..a93b2346 100644
--- a/src/monitor/monitor.c
+++ b/src/monitor/monitor.c
@@ -781,7 +781,7 @@ int get_monitor_config(struct mt_ctx *ctx)
int timeout_seconds;
char *badsrv = NULL;
- ret = confdb_get_int(ctx->cdb, ctx,
+ ret = confdb_get_int(ctx->cdb,
CONFDB_MONITOR_CONF_ENTRY,
CONFDB_MONITOR_SBUS_TIMEOUT,
10, &timeout_seconds);
@@ -932,7 +932,7 @@ static int get_service_config(struct mt_ctx *ctx, const char *name,
}
}
- ret = confdb_get_int(ctx->cdb, svc, path,
+ ret = confdb_get_int(ctx->cdb, path,
CONFDB_SERVICE_TIMEOUT,
MONITOR_DEF_PING_TIME, &svc->ping_time);
if (ret != EOK) {
@@ -1031,7 +1031,7 @@ static int get_provider_config(struct mt_ctx *ctx, const char *name,
return ret;
}
- ret = confdb_get_int(ctx->cdb, svc, path,
+ ret = confdb_get_int(ctx->cdb, path,
CONFDB_DOMAIN_TIMEOUT,
MONITOR_DEF_PING_TIME, &svc->ping_time);
if (ret != EOK) {
@@ -1799,7 +1799,7 @@ static int monitor_config_file(TALLOC_CTX *mem_ctx,
ctx->file_ctx->mt_ctx = ctx;
}
- ret = confdb_get_bool(ctx->cdb, ctx,
+ ret = confdb_get_bool(ctx->cdb,
CONFDB_MONITOR_CONF_ENTRY,
CONFDB_MONITOR_TRY_INOTIFY,
true, &use_inotify);
diff --git a/src/monitor/monitor_sbus.c b/src/monitor/monitor_sbus.c
index a1c6ad33..66270a7f 100644
--- a/src/monitor/monitor_sbus.c
+++ b/src/monitor/monitor_sbus.c
@@ -192,7 +192,7 @@ errno_t monitor_common_rotate_logs(struct confdb_ctx *confdb,
}
/* Get new debug level from the confdb */
- ret = confdb_get_int(confdb, NULL, conf_path,
+ ret = confdb_get_int(confdb, conf_path,
CONFDB_SERVICE_DEBUG_LEVEL,
old_debug_level,
&debug_level);
diff --git a/src/providers/data_provider_fo.c b/src/providers/data_provider_fo.c
index dd73e9d9..81c94f33 100644
--- a/src/providers/data_provider_fo.c
+++ b/src/providers/data_provider_fo.c
@@ -67,7 +67,7 @@ static int be_fo_get_options(struct be_ctx *ctx,
{
errno_t ret;
- ret = confdb_get_int(ctx->cdb, ctx, ctx->conf_path,
+ ret = confdb_get_int(ctx->cdb, ctx->conf_path,
CONFDB_DOMAIN_RESOLV_TIMEOUT,
FO_DEFAULT_SVC_TIMEOUT,
&opts->service_resolv_timeout);
@@ -102,10 +102,9 @@ int be_init_failover(struct be_ctx *ctx)
return ENOMEM;
}
- ret = confdb_get_int(ctx->cdb, ctx, ctx->conf_path,
+ ret = confdb_get_int(ctx->cdb, ctx->conf_path,
CONFDB_DOMAIN_RESOLV_OP_TIMEOUT,
- RESOLV_DEFAULT_TIMEOUT,
- &resolv_timeout);
+ RESOLV_DEFAULT_TIMEOUT, &resolv_timeout);
if (ret != EOK) {
return ret;
}
diff --git a/src/providers/data_provider_opts.c b/src/providers/data_provider_opts.c
index 3fdbb055..94849991 100644
--- a/src/providers/data_provider_opts.c
+++ b/src/providers/data_provider_opts.c
@@ -85,7 +85,7 @@ int dp_get_options(TALLOC_CTX *memctx,
break;
case DP_OPT_NUMBER:
- ret = confdb_get_int(cdb, opts, conf_path,
+ ret = confdb_get_int(cdb, conf_path,
opts[i].opt_name,
opts[i].def_val.number,
&opts[i].val.number);
@@ -99,7 +99,7 @@ int dp_get_options(TALLOC_CTX *memctx,
break;
case DP_OPT_BOOL:
- ret = confdb_get_bool(cdb, opts, conf_path,
+ ret = confdb_get_bool(cdb, conf_path,
opts[i].opt_name,
opts[i].def_val.boolean,
&opts[i].val.boolean);
diff --git a/src/providers/ipa/ipa_dyndns.c b/src/providers/ipa/ipa_dyndns.c
index 0d2c34e6..1e4d97ed 100644
--- a/src/providers/ipa/ipa_dyndns.c
+++ b/src/providers/ipa/ipa_dyndns.c
@@ -144,7 +144,7 @@ errno_t ipa_dyndns_init(struct be_ctx *be_ctx,
errno_t ret;
int resolv_timeout;
- ret = confdb_get_int(be_ctx->cdb, be_ctx, be_ctx->conf_path,
+ ret = confdb_get_int(be_ctx->cdb, be_ctx->conf_path,
CONFDB_DOMAIN_RESOLV_TIMEOUT,
RESOLV_DEFAULT_TIMEOUT, &resolv_timeout);
if (ret != EOK) {
diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c
index 4f78313b..cec3989d 100644
--- a/src/providers/ldap/ldap_common.c
+++ b/src/providers/ldap/ldap_common.c
@@ -376,7 +376,7 @@ int ldap_get_options(TALLOC_CTX *memctx,
}
/* account_cache_expiration must be >= than offline_credentials_expiration */
- ret = confdb_get_int(cdb, memctx, CONFDB_PAM_CONF_ENTRY,
+ ret = confdb_get_int(cdb, CONFDB_PAM_CONF_ENTRY,
CONFDB_PAM_CRED_TIMEOUT, 0,
&offline_credentials_expiration);
if (ret != EOK) {
diff --git a/src/responder/autofs/autofssrv.c b/src/responder/autofs/autofssrv.c
index 76d27070..096cce9d 100644
--- a/src/responder/autofs/autofssrv.c
+++ b/src/responder/autofs/autofssrv.c
@@ -62,7 +62,7 @@ autofs_get_config(struct autofs_ctx *actx,
{
errno_t ret;
- ret = confdb_get_int(cdb, actx, CONFDB_AUTOFS_CONF_ENTRY,
+ ret = confdb_get_int(cdb, CONFDB_AUTOFS_CONF_ENTRY,
CONFDB_AUTOFS_MAP_NEG_TIMEOUT, 15,
&actx->neg_timeout);
if (ret != EOK) {
@@ -142,7 +142,7 @@ autofs_process_init(TALLOC_CTX *mem_ctx,
autofs_ctx->rctx->pvt_ctx = autofs_ctx;
/* Enable automatic reconnection to the Data Provider */
- ret = confdb_get_int(autofs_ctx->rctx->cdb, autofs_ctx->rctx,
+ ret = confdb_get_int(autofs_ctx->rctx->cdb,
CONFDB_AUTOFS_CONF_ENTRY,
CONFDB_SERVICE_RECON_RETRIES,
3, &max_retries);
diff --git a/src/responder/nss/nsssrv.c b/src/responder/nss/nsssrv.c
index ef66b22f..f97898d4 100644
--- a/src/responder/nss/nsssrv.c
+++ b/src/responder/nss/nsssrv.c
@@ -135,22 +135,22 @@ static int nss_get_config(struct nss_ctx *nctx,
{
int ret;
- ret = confdb_get_int(cdb, nctx, CONFDB_NSS_CONF_ENTRY,
+ ret = confdb_get_int(cdb, CONFDB_NSS_CONF_ENTRY,
CONFDB_NSS_ENUM_CACHE_TIMEOUT, 120,
&nctx->enum_cache_timeout);
if (ret != EOK) goto done;
- ret = confdb_get_int(cdb, nctx, CONFDB_NSS_CONF_ENTRY,
+ ret = confdb_get_int(cdb, CONFDB_NSS_CONF_ENTRY,
CONFDB_NSS_ENTRY_NEG_TIMEOUT, 15,
&nctx->neg_timeout);
if (ret != EOK) goto done;
- ret = confdb_get_bool(cdb, nctx, CONFDB_NSS_CONF_ENTRY,
+ ret = confdb_get_bool(cdb, CONFDB_NSS_CONF_ENTRY,
CONFDB_NSS_FILTER_USERS_IN_GROUPS, true,
&nctx->filter_users_in_groups);
if (ret != EOK) goto done;
- ret = confdb_get_int(cdb, nctx, CONFDB_NSS_CONF_ENTRY,
+ ret = confdb_get_int(cdb, CONFDB_NSS_CONF_ENTRY,
CONFDB_NSS_ENTRY_CACHE_NOWAIT_PERCENTAGE, 50,
&nctx->cache_refresh_percent);
if (ret != EOK) goto done;
@@ -288,7 +288,7 @@ int nss_process_init(TALLOC_CTX *mem_ctx,
}
/* Enable automatic reconnection to the Data Provider */
- ret = confdb_get_int(nctx->rctx->cdb, nctx->rctx,
+ ret = confdb_get_int(nctx->rctx->cdb,
CONFDB_NSS_CONF_ENTRY,
CONFDB_SERVICE_RECON_RETRIES,
3, &max_retries);
@@ -310,7 +310,7 @@ int nss_process_init(TALLOC_CTX *mem_ctx,
}
/* Set up file descriptor limits */
- ret = confdb_get_int(nctx->rctx->cdb, nctx->rctx,
+ ret = confdb_get_int(nctx->rctx->cdb,
CONFDB_NSS_CONF_ENTRY,
CONFDB_SERVICE_FD_LIMIT,
DEFAULT_NSS_FD_LIMIT,
diff --git a/src/responder/pam/pamsrv.c b/src/responder/pam/pamsrv.c
index 6cb564a7..fdb23294 100644
--- a/src/responder/pam/pamsrv.c
+++ b/src/responder/pam/pamsrv.c
@@ -139,7 +139,7 @@ static int pam_process_init(TALLOC_CTX *mem_ctx,
/* FIXME: "retries" is too generic, either get it from a global config
* or specify these retries are about the sbus connections to DP */
- ret = confdb_get_int(pctx->rctx->cdb, pctx->rctx, CONFDB_PAM_CONF_ENTRY,
+ ret = confdb_get_int(pctx->rctx->cdb, CONFDB_PAM_CONF_ENTRY,
CONFDB_SERVICE_RECON_RETRIES, 3, &max_retries);
if (ret != EOK) {
DEBUG(0, ("Failed to set up automatic reconnection\n"));
@@ -152,13 +152,13 @@ static int pam_process_init(TALLOC_CTX *mem_ctx,
}
/* Set up the negative cache */
- ret = confdb_get_int(cdb, pctx, CONFDB_NSS_CONF_ENTRY,
+ ret = confdb_get_int(cdb, CONFDB_NSS_CONF_ENTRY,
CONFDB_NSS_ENTRY_NEG_TIMEOUT, 15,
&pctx->neg_timeout);
if (ret != EOK) goto done;
/* Set up the PAM identity timeout */
- ret = confdb_get_int(cdb, pctx, CONFDB_PAM_CONF_ENTRY,
+ ret = confdb_get_int(cdb, CONFDB_PAM_CONF_ENTRY,
CONFDB_PAM_ID_TIMEOUT, 5,
&id_timeout);
if (ret != EOK) goto done;
@@ -187,7 +187,7 @@ static int pam_process_init(TALLOC_CTX *mem_ctx,
}
/* Set up file descriptor limits */
- ret = confdb_get_int(pctx->rctx->cdb, pctx->rctx,
+ ret = confdb_get_int(pctx->rctx->cdb,
CONFDB_PAM_CONF_ENTRY,
CONFDB_SERVICE_FD_LIMIT,
DEFAULT_PAM_FD_LIMIT,
diff --git a/src/responder/pam/pamsrv_cmd.c b/src/responder/pam/pamsrv_cmd.c
index bf511487..841bbf43 100644
--- a/src/responder/pam/pamsrv_cmd.c
+++ b/src/responder/pam/pamsrv_cmd.c
@@ -524,7 +524,7 @@ static errno_t filter_responses(struct confdb_ctx *cdb,
return ENOMEM;
}
- ret = confdb_get_int(cdb, tmp_ctx, CONFDB_PAM_CONF_ENTRY,
+ ret = confdb_get_int(cdb, CONFDB_PAM_CONF_ENTRY,
CONFDB_PAM_VERBOSITY, DEFAULT_PAM_VERBOSITY,
&pam_verbosity);
if (ret != EOK) {
@@ -533,7 +533,7 @@ static errno_t filter_responses(struct confdb_ctx *cdb,
}
- ret = confdb_get_int(cdb, tmp_ctx, CONFDB_PAM_CONF_ENTRY,
+ ret = confdb_get_int(cdb, CONFDB_PAM_CONF_ENTRY,
CONFDB_PAM_PWD_EXPIRATION_WARNING,
DEFAULT_PAM_PWD_EXPIRATION_WARNING,
&pam_expiration_warning);
diff --git a/src/responder/ssh/sshsrv.c b/src/responder/ssh/sshsrv.c
index e5bb5b09..20f44ca9 100644
--- a/src/responder/ssh/sshsrv.c
+++ b/src/responder/ssh/sshsrv.c
@@ -113,7 +113,7 @@ int ssh_process_init(TALLOC_CTX *mem_ctx,
ssh_ctx->rctx->pvt_ctx = ssh_ctx;
/* Enable automatic reconnection to the Data Provider */
- ret = confdb_get_int(ssh_ctx->rctx->cdb, ssh_ctx->rctx,
+ ret = confdb_get_int(ssh_ctx->rctx->cdb,
CONFDB_SSH_CONF_ENTRY,
CONFDB_SERVICE_RECON_RETRIES,
3, &max_retries);
diff --git a/src/responder/sudo/sudosrv.c b/src/responder/sudo/sudosrv.c
index c8e36adc..137bd327 100644
--- a/src/responder/sudo/sudosrv.c
+++ b/src/responder/sudo/sudosrv.c
@@ -114,7 +114,7 @@ int sudo_process_init(TALLOC_CTX *mem_ctx,
sudo_ctx->rctx->pvt_ctx = sudo_ctx;
/* Enable automatic reconnection to the Data Provider */
- ret = confdb_get_int(sudo_ctx->rctx->cdb, sudo_ctx->rctx,
+ ret = confdb_get_int(sudo_ctx->rctx->cdb,
CONFDB_SUDO_CONF_ENTRY,
CONFDB_SERVICE_RECON_RETRIES,
3, &max_retries);
@@ -132,7 +132,7 @@ int sudo_process_init(TALLOC_CTX *mem_ctx,
/* Get responder options */
/* Get cache_timeout option */
- ret = confdb_get_int(sudo_ctx->rctx->cdb, sudo_ctx,
+ ret = confdb_get_int(sudo_ctx->rctx->cdb,
CONFDB_SUDO_CONF_ENTRY, CONFDB_SUDO_CACHE_TIMEOUT,
CONFDB_DEFAULT_SUDO_CACHE_TIMEOUT,
&sudo_ctx->cache_timeout);
@@ -143,7 +143,7 @@ int sudo_process_init(TALLOC_CTX *mem_ctx,
}
/* Get sudo_timed option */
- ret = confdb_get_bool(sudo_ctx->rctx->cdb, sudo_ctx,
+ ret = confdb_get_bool(sudo_ctx->rctx->cdb,
CONFDB_SUDO_CONF_ENTRY, CONFDB_SUDO_TIMED,
CONFDB_DEFAULT_SUDO_TIMED,
&sudo_ctx->timed);
diff --git a/src/tools/sss_sync_ops.c b/src/tools/sss_sync_ops.c
index 79de8fc8..380e6127 100644
--- a/src/tools/sss_sync_ops.c
+++ b/src/tools/sss_sync_ops.c
@@ -317,7 +317,7 @@ int userdel_defaults(TALLOC_CTX *mem_ctx,
/* remove homedir on user creation? */
if (!remove_home) {
- ret = confdb_get_bool(confdb, mem_ctx,
+ ret = confdb_get_bool(confdb,
conf_path, CONFDB_LOCAL_REMOVE_HOMEDIR,
DFL_REMOVE_HOMEDIR, &dfl_remove_home);
if (ret != EOK) {
@@ -408,7 +408,7 @@ int useradd_defaults(TALLOC_CTX *mem_ctx,
/* create homedir on user creation? */
if (!create_home) {
- ret = confdb_get_bool(confdb, mem_ctx,
+ ret = confdb_get_bool(confdb,
conf_path, CONFDB_LOCAL_CREATE_HOMEDIR,
DFL_CREATE_HOMEDIR, &data->create_homedir);
if (ret != EOK) {
@@ -420,7 +420,7 @@ int useradd_defaults(TALLOC_CTX *mem_ctx,
DEBUG(7, ("Auto create homedir: %s\n", data->create_homedir?"True":"False"));
/* umask to create homedirs */
- ret = confdb_get_int(confdb, mem_ctx,
+ ret = confdb_get_int(confdb,
conf_path, CONFDB_LOCAL_UMASK,
DFL_UMASK, (int *) &data->umask);
if (ret != EOK) {
diff --git a/src/util/server.c b/src/util/server.c
index 10f43fcf..95b18363 100644
--- a/src/util/server.c
+++ b/src/util/server.c
@@ -464,7 +464,7 @@ int server_setup(const char *name, int flags,
if (debug_level == SSSDBG_UNRESOLVED) {
/* set debug level if any in conf_entry */
- ret = confdb_get_int(ctx->confdb_ctx, ctx, conf_entry,
+ ret = confdb_get_int(ctx->confdb_ctx, conf_entry,
CONFDB_SERVICE_DEBUG_LEVEL,
SSSDBG_DEFAULT,
&debug_level);
@@ -479,7 +479,7 @@ int server_setup(const char *name, int flags,
/* same for debug timestamps */
if (debug_timestamps == SSSDBG_TIMESTAMP_UNRESOLVED) {
- ret = confdb_get_bool(ctx->confdb_ctx, ctx, conf_entry,
+ ret = confdb_get_bool(ctx->confdb_ctx, conf_entry,
CONFDB_SERVICE_DEBUG_TIMESTAMPS,
SSSDBG_TIMESTAMP_DEFAULT,
&dt);
@@ -494,7 +494,7 @@ int server_setup(const char *name, int flags,
/* same for debug microseconds */
if (debug_microseconds == SSSDBG_MICROSECONDS_UNRESOLVED) {
- ret = confdb_get_bool(ctx->confdb_ctx, ctx, conf_entry,
+ ret = confdb_get_bool(ctx->confdb_ctx, conf_entry,
CONFDB_SERVICE_DEBUG_MICROSECONDS,
SSSDBG_MICROSECONDS_DEFAULT,
&dm);
@@ -509,7 +509,7 @@ int server_setup(const char *name, int flags,
/* same for debug to file */
dl = (debug_to_file != 0);
- ret = confdb_get_bool(ctx->confdb_ctx, ctx, conf_entry,
+ ret = confdb_get_bool(ctx->confdb_ctx, conf_entry,
CONFDB_SERVICE_DEBUG_TO_FILES,
dl, &dl);
if (ret != EOK) {