73 lines
2.8 KiB
Diff
73 lines
2.8 KiB
Diff
|
From 4f8400f86d33d0f64adccb71c8190ad33db2770a Mon Sep 17 00:00:00 2001
|
||
|
From: Stephen Gallagher <sgallagh@redhat.com>
|
||
|
Date: Tue, 2 Nov 2010 07:46:13 -0400
|
||
|
Subject: [PATCH 2/2] Properly document ldap_purge_cache_timeout
|
||
|
|
||
|
Also allow it to be disabled entirely
|
||
|
---
|
||
|
src/man/sssd-ldap.5.xml | 19 +++++++++++++++++++
|
||
|
src/providers/ldap/ldap_common.c | 10 +++++++++-
|
||
|
2 files changed, 28 insertions(+), 1 deletions(-)
|
||
|
|
||
|
diff --git a/src/man/sssd-ldap.5.xml b/src/man/sssd-ldap.5.xml
|
||
|
index 87d388ade2b9b3613a18eb70e079b1266e940a14..64f216f5f5092a23635b9c4f96dbb133b309e556 100644
|
||
|
--- a/src/man/sssd-ldap.5.xml
|
||
|
+++ b/src/man/sssd-ldap.5.xml
|
||
|
@@ -447,6 +447,25 @@
|
||
|
</varlistentry>
|
||
|
|
||
|
<varlistentry>
|
||
|
+ <term>ldap_purge_cache_timeout</term>
|
||
|
+ <listitem>
|
||
|
+ <para>
|
||
|
+ Determine how often to check the cache for
|
||
|
+ inactive entries (such as groups with no
|
||
|
+ members and users who have never logged in) and
|
||
|
+ remove them to save space.
|
||
|
+ </para>
|
||
|
+ <para>
|
||
|
+ Setting this option to zero will disable the
|
||
|
+ cache cleanup operation.
|
||
|
+ </para>
|
||
|
+ <para>
|
||
|
+ Default: 10800 (12 hours)
|
||
|
+ </para>
|
||
|
+ </listitem>
|
||
|
+ </varlistentry>
|
||
|
+
|
||
|
+ <varlistentry>
|
||
|
<term>ldap_user_fullname (string)</term>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c
|
||
|
index ea5f957076675b4b8210917a928761e68088d485..c074098d6574078a6ec0e80851a1b02a51f5b0e1 100644
|
||
|
--- a/src/providers/ldap/ldap_common.c
|
||
|
+++ b/src/providers/ldap/ldap_common.c
|
||
|
@@ -397,6 +397,7 @@ int sdap_id_setup_tasks(struct sdap_id_ctx *ctx)
|
||
|
{
|
||
|
struct timeval tv;
|
||
|
int ret = EOK;
|
||
|
+ int delay;
|
||
|
|
||
|
/* set up enumeration task */
|
||
|
if (ctx->be->domain->enumerate) {
|
||
|
@@ -406,7 +407,14 @@ int sdap_id_setup_tasks(struct sdap_id_ctx *ctx)
|
||
|
ret = ldap_id_enumerate_set_timer(ctx, tv);
|
||
|
} else {
|
||
|
/* the enumeration task, runs the cleanup process by itself,
|
||
|
- * but if enumeration is not runnig we need to schedule it */
|
||
|
+ * but if enumeration is not running we need to schedule it */
|
||
|
+ delay = dp_opt_get_int(ctx->opts->basic, SDAP_CACHE_PURGE_TIMEOUT);
|
||
|
+ if (delay == 0) {
|
||
|
+ /* Cleanup has been explicitly disabled, so we won't
|
||
|
+ * schedule any cleanup tasks.
|
||
|
+ */
|
||
|
+ return EOK;
|
||
|
+ }
|
||
|
|
||
|
/* run the first one in a couple of seconds so that we have time to
|
||
|
* finish initializations first*/
|
||
|
--
|
||
|
1.7.3.2
|
||
|
|