diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2010-09-19 10:49:29 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-10-13 09:49:37 -0400 |
commit | d94c1a6b8badd8e4cf94815ad14ce6c0c715e9d3 (patch) | |
tree | 6a1bee10f5d74e6ff4b3da309ae6a961edb0dcf2 /src | |
parent | 3ba74ad02d3a20d50c068faa02797fafba105508 (diff) | |
download | sssd-d94c1a6b8badd8e4cf94815ad14ce6c0c715e9d3.tar.gz sssd-d94c1a6b8badd8e4cf94815ad14ce6c0c715e9d3.tar.bz2 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.
Diffstat (limited to 'src')
-rw-r--r-- | src/confdb/confdb.c | 7 | ||||
-rw-r--r-- | src/confdb/confdb.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c index 1277e99c..4975a427 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 d553beb2..5726ad5d 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; }; |