summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/confdb/confdb.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
index c097aad77..d811f7cbf 100644
--- a/src/confdb/confdb.c
+++ b/src/confdb/confdb.c
@@ -827,6 +827,7 @@ static int confdb_get_domain_internal(struct confdb_ctx *cdb,
uint32_t entry_cache_timeout;
char *default_domain;
bool fqnames_default = false;
+ int memcache_timeout;
tmp_ctx = talloc_new(mem_ctx);
if (!tmp_ctx) return ENOMEM;
@@ -851,6 +852,16 @@ static int confdb_get_domain_internal(struct confdb_ctx *cdb,
goto done;
}
+ ret = confdb_get_int(cdb,
+ CONFDB_NSS_CONF_ENTRY,
+ CONFDB_MEMCACHE_TIMEOUT,
+ 300, &memcache_timeout);
+ if (ret != EOK) {
+ DEBUG(SSSDBG_FATAL_FAILURE,
+ "Unable to get memory cache entry timeout.\n");
+ goto done;
+ }
+
domain = talloc_zero(mem_ctx, struct sss_domain_info);
if (!domain) {
ret = ENOMEM;
@@ -1078,6 +1089,13 @@ static int confdb_get_domain_internal(struct confdb_ctx *cdb,
goto done;
}
+ if (domain->user_timeout < memcache_timeout) {
+ DEBUG(SSSDBG_CONF_SETTINGS,
+ "%s is less than %s. User records will not be updated before "
+ "memory cache entry expires.\n",
+ CONFDB_DOMAIN_USER_CACHE_TIMEOUT, CONFDB_MEMCACHE_TIMEOUT);
+ }
+
/* Override the group cache timeout, if specified */
ret = get_entry_as_uint32(res->msgs[0], &domain->group_timeout,
CONFDB_DOMAIN_GROUP_CACHE_TIMEOUT,
@@ -1089,6 +1107,13 @@ static int confdb_get_domain_internal(struct confdb_ctx *cdb,
goto done;
}
+ if (domain->group_timeout < memcache_timeout) {
+ DEBUG(SSSDBG_CONF_SETTINGS,
+ "%s is less than %s. Group records will not be updated before "
+ "memory cache entry expires.\n",
+ CONFDB_DOMAIN_GROUP_CACHE_TIMEOUT, CONFDB_MEMCACHE_TIMEOUT);
+ }
+
/* Override the netgroup cache timeout, if specified */
ret = get_entry_as_uint32(res->msgs[0], &domain->netgroup_timeout,
CONFDB_DOMAIN_NETGROUP_CACHE_TIMEOUT,