summaryrefslogtreecommitdiffstats
path: root/src/confdb/confdb.c
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2012-04-23 14:40:51 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-06-29 11:37:16 -0400
commitda9fd6373b94a49b748542ab568997b9e2421972 (patch)
tree7893f685d129bdb3d7f0f220be2296a002d90b61 /src/confdb/confdb.c
parent751a7930d5af7c1a3c36936e3c5b9205189c6b92 (diff)
downloadsssd-da9fd6373b94a49b748542ab568997b9e2421972.tar.gz
sssd-da9fd6373b94a49b748542ab568997b9e2421972.tar.xz
sssd-da9fd6373b94a49b748542ab568997b9e2421972.zip
confdb: add entry_cache_sudo_timeout option
Diffstat (limited to 'src/confdb/confdb.c')
-rw-r--r--src/confdb/confdb.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
index cbd427147..5915f2f36 100644
--- a/src/confdb/confdb.c
+++ b/src/confdb/confdb.c
@@ -922,6 +922,17 @@ static int confdb_get_domain_internal(struct confdb_ctx *cdb,
goto done;
}
+ /* Override the sudo cache timeout, if specified */
+ ret = get_entry_as_uint32(res->msgs[0], &domain->sudo_timeout,
+ CONFDB_DOMAIN_SUDO_CACHE_TIMEOUT,
+ entry_cache_timeout);
+ if (ret != EOK) {
+ DEBUG(SSSDBG_FATAL_FAILURE,
+ ("Invalid value for [%s]\n",
+ CONFDB_DOMAIN_SUDO_CACHE_TIMEOUT));
+ goto done;
+ }
+
/* Set the PAM warning time, if specified */
val = ldb_msg_find_attr_as_int(res->msgs[0],
CONFDB_DOMAIN_PWD_EXPIRATION_WARNING,