summaryrefslogtreecommitdiff
path: root/src/confdb
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
parent751a7930d5af7c1a3c36936e3c5b9205189c6b92 (diff)
downloadsssd-da9fd6373b94a49b748542ab568997b9e2421972.tar.gz
sssd-da9fd6373b94a49b748542ab568997b9e2421972.tar.bz2
sssd-da9fd6373b94a49b748542ab568997b9e2421972.zip
confdb: add entry_cache_sudo_timeout option
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;