summaryrefslogtreecommitdiff
path: root/src/confdb
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2013-05-13 10:30:48 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-06-10 20:30:57 +0200
commit0cf0e2d758d09e9b314ba72ce6638df10b258462 (patch)
tree4b7e85b222faff8a921095fbc3e8d8da898e38cb /src/confdb
parentb79e0e50a935d108173ca3062f2afe16103fcb1d (diff)
downloadsssd-0cf0e2d758d09e9b314ba72ce6638df10b258462.tar.gz
sssd-0cf0e2d758d09e9b314ba72ce6638df10b258462.tar.bz2
sssd-0cf0e2d758d09e9b314ba72ce6638df10b258462.zip
back end: add refresh expired records periodic task
https://fedorahosted.org/sssd/ticket/1713 Add new option refresh_expired_interval.
Diffstat (limited to 'src/confdb')
-rw-r--r--src/confdb/confdb.c11
-rw-r--r--src/confdb/confdb.h3
2 files changed, 14 insertions, 0 deletions
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
index e1888678..693118e7 100644
--- a/src/confdb/confdb.c
+++ b/src/confdb/confdb.c
@@ -1020,6 +1020,17 @@ static int confdb_get_domain_internal(struct confdb_ctx *cdb,
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,
+ 0);
+ if (ret != EOK) {
+ DEBUG(SSSDBG_FATAL_FAILURE,
+ ("Invalid value for [%s]\n",
+ CONFDB_DOMAIN_REFRESH_EXPIRED_INTERVAL));
+ goto done;
+ }
+
/* Set the PAM warning time, if specified. If not specified, pass on
* the "not set" value of "-1" which means "use provider default". The
* value 0 means "always display the warning if server sends one" */
diff --git a/src/confdb/confdb.h b/src/confdb/confdb.h
index 1d964739..e1111025 100644
--- a/src/confdb/confdb.h
+++ b/src/confdb/confdb.h
@@ -167,6 +167,7 @@
#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"
+#define CONFDB_DOMAIN_REFRESH_EXPIRED_INTERVAL "refresh_expired_interval"
/* Local Provider */
#define CONFDB_LOCAL_DEFAULT_SHELL "default_shell"
@@ -220,6 +221,8 @@ struct sss_domain_info {
uint32_t autofsmap_timeout;
uint32_t sudo_timeout;
+ uint32_t refresh_expired_interval;
+
int pwd_expiration_warning;
struct sysdb_ctx *sysdb;