summaryrefslogtreecommitdiffstats
path: root/src/confdb
diff options
context:
space:
mode:
authorWilliam B <william@adelaide.edu.au>2014-07-21 11:13:25 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-09-05 11:40:39 +0200
commit3ac7c4fe618ede980a4df8d90341ef1fd0f1f62f (patch)
tree940c252ca1538b4d8cd60e94d95073d6a845f040 /src/confdb
parent61602026ed8c91efd166000562899670449f1b50 (diff)
downloadsssd-3ac7c4fe618ede980a4df8d90341ef1fd0f1f62f.tar.gz
sssd-3ac7c4fe618ede980a4df8d90341ef1fd0f1f62f.tar.xz
sssd-3ac7c4fe618ede980a4df8d90341ef1fd0f1f62f.zip
SSS_CACHE: Allow sss_cache tool to flush SSH hosts cache
Resolves: https://fedorahosted.org/sssd/ticket/2358 Signed-off-by: Jan Cholasta <jcholast@redhat.com> Reviewed-by: Jan Cholasta <jcholast@redhat.com> Reviewed-by: Pavel Reichl <preichl@redhat.com>
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 49e23e34e..0adff2b08 100644
--- a/src/confdb/confdb.c
+++ b/src/confdb/confdb.c
@@ -1036,6 +1036,17 @@ static int confdb_get_domain_internal(struct confdb_ctx *cdb,
goto done;
}
+ /* Override the ssh known hosts timeout, if specified */
+ ret = get_entry_as_uint32(res->msgs[0], &domain->ssh_host_timeout,
+ CONFDB_DOMAIN_SSH_HOST_CACHE_TIMEOUT,
+ entry_cache_timeout);
+ if (ret != EOK) {
+ DEBUG(SSSDBG_FATAL_FAILURE,
+ "Invalid value for [%s]\n",
+ CONFDB_DOMAIN_SSH_HOST_CACHE_TIMEOUT);
+ goto done;
+ }
+
/* Set refresh_expired_interval, if specified */
ret = get_entry_as_uint32(res->msgs[0], &domain->refresh_expired_interval,
CONFDB_DOMAIN_REFRESH_EXPIRED_INTERVAL,
diff --git a/src/confdb/confdb.h b/src/confdb/confdb.h
index a28589186..1697c69f0 100644
--- a/src/confdb/confdb.h
+++ b/src/confdb/confdb.h
@@ -176,6 +176,7 @@
#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_SSH_HOST_CACHE_TIMEOUT "entry_cache_ssh_host_timeout"
#define CONFDB_DOMAIN_PWD_EXPIRATION_WARNING "pwd_expiration_warning"
#define CONFDB_DOMAIN_REFRESH_EXPIRED_INTERVAL "refresh_expired_interval"
#define CONFDB_DOMAIN_OFFLINE_TIMEOUT "offline_timeout"
@@ -234,6 +235,7 @@ struct sss_domain_info {
uint32_t service_timeout;
uint32_t autofsmap_timeout;
uint32_t sudo_timeout;
+ uint32_t ssh_host_timeout;
uint32_t refresh_expired_interval;
uint32_t subdomain_refresh_interval;