summaryrefslogtreecommitdiff
path: root/src/confdb
diff options
context:
space:
mode:
Diffstat (limited to 'src/confdb')
-rw-r--r--src/confdb/confdb.c11
-rw-r--r--src/confdb/confdb.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
index cbd42714..5915f2f3 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,
diff --git a/src/confdb/confdb.h b/src/confdb/confdb.h
index 0c04112e..cdbd1ff1 100644
--- a/src/confdb/confdb.h
+++ b/src/confdb/confdb.h
@@ -163,6 +163,7 @@
#define CONFDB_DOMAIN_NETGROUP_CACHE_TIMEOUT "entry_cache_netgroup_timeout"
#define CONFDB_DOMAIN_SERVICE_CACHE_TIMEOUT "entry_cache_service_timeout"
#define CONFDB_DOMAIN_AUTOFS_CACHE_TIMEOUT "entry_cache_autofs_timeout"
+#define CONFDB_DOMAIN_SUDO_CACHE_TIMEOUT "entry_cache_sudo_timeout"
#define CONFDB_DOMAIN_PWD_EXPIRATION_WARNING "pwd_expiration_warning"
/* Local Provider */
@@ -211,6 +212,7 @@ struct sss_domain_info {
uint32_t netgroup_timeout;
uint32_t service_timeout;
uint32_t autofsmap_timeout;
+ uint32_t sudo_timeout;
int pwd_expiration_warning;