summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-09-19 10:49:29 -0400
committerStephen Gallagher <sgallagh@redhat.com>2010-10-13 09:49:37 -0400
commitd94c1a6b8badd8e4cf94815ad14ce6c0c715e9d3 (patch)
tree6a1bee10f5d74e6ff4b3da309ae6a961edb0dcf2
parent3ba74ad02d3a20d50c068faa02797fafba105508 (diff)
downloadsssd-d94c1a6b8badd8e4cf94815ad14ce6c0c715e9d3.tar.gz
sssd-d94c1a6b8badd8e4cf94815ad14ce6c0c715e9d3.tar.xz
sssd-d94c1a6b8badd8e4cf94815ad14ce6c0c715e9d3.zip
Store entry_cache_timeout in sss_domain_info object
This is useful so that the NSS responder can identify an domain's entry timeout for expiring the memory cache for a lookup such as with netgroups.
-rw-r--r--src/confdb/confdb.c7
-rw-r--r--src/confdb/confdb.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
index 1277e99c5..4975a4276 100644
--- a/src/confdb/confdb.c
+++ b/src/confdb/confdb.c
@@ -835,6 +835,13 @@ static int confdb_get_domain_internal(struct confdb_ctx *cdb,
goto done;
}
+ ret = get_entry_as_uint32(res->msgs[0], &domain->entry_cache_timeout,
+ CONFDB_DOMAIN_ENTRY_CACHE_TIMEOUT, 5400);
+ if (ret != EOK) {
+ DEBUG(0, ("Invalid value for [%s]\n", CONFDB_DOMAIN_ENTRY_CACHE_TIMEOUT));
+ goto done;
+ }
+
*_domain = domain;
ret = EOK;
diff --git a/src/confdb/confdb.h b/src/confdb/confdb.h
index d553beb28..5726ad5dc 100644
--- a/src/confdb/confdb.h
+++ b/src/confdb/confdb.h
@@ -140,6 +140,8 @@ struct sss_domain_info {
bool cache_credentials;
bool legacy_passwords;
+ uint32_t entry_cache_timeout;
+
struct sss_domain_info *next;
};