|
|
8d3578 |
From 9131b90f08e69a4d71c6d1524e3b8929d947b7c7 Mon Sep 17 00:00:00 2001
|
|
|
8d3578 |
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
|
|
|
8d3578 |
Date: Thu, 5 Sep 2019 11:32:53 +0200
|
|
|
8d3578 |
Subject: [PATCH 90/90] sss_cache: invalidate also autofs entries
|
|
|
8d3578 |
MIME-Version: 1.0
|
|
|
8d3578 |
Content-Type: text/plain; charset=UTF-8
|
|
|
8d3578 |
Content-Transfer-Encoding: 8bit
|
|
|
8d3578 |
|
|
|
8d3578 |
Invalidating map will also invalidate all its child entries.
|
|
|
8d3578 |
|
|
|
8d3578 |
Resolves:
|
|
|
8d3578 |
https://pagure.io/SSSD/sssd/issue/2607
|
|
|
8d3578 |
|
|
|
8d3578 |
Reviewed-by: Tomáš Halman <thalman@redhat.com>
|
|
|
8d3578 |
---
|
|
|
8d3578 |
src/tools/sss_cache.c | 15 +++++++++++++++
|
|
|
8d3578 |
1 file changed, 15 insertions(+)
|
|
|
8d3578 |
|
|
|
8d3578 |
diff --git a/src/tools/sss_cache.c b/src/tools/sss_cache.c
|
|
|
8d3578 |
index 6bdcf610c..34bfa76bc 100644
|
|
|
8d3578 |
--- a/src/tools/sss_cache.c
|
|
|
8d3578 |
+++ b/src/tools/sss_cache.c
|
|
|
8d3578 |
@@ -576,8 +576,23 @@ static errno_t invalidate_entry(TALLOC_CTX *ctx,
|
|
|
8d3578 |
sys_attrs, SYSDB_MOD_REP);
|
|
|
8d3578 |
break;
|
|
|
8d3578 |
case TYPE_AUTOFSMAP:
|
|
|
8d3578 |
+ /* For users, we also need to reset the enumeration
|
|
|
8d3578 |
+ * expiration time. */
|
|
|
8d3578 |
+ ret = sysdb_attrs_add_time_t(sys_attrs,
|
|
|
8d3578 |
+ SYSDB_ENUM_EXPIRE, 1);
|
|
|
8d3578 |
+ if (ret != EOK) {
|
|
|
8d3578 |
+ return ret;
|
|
|
8d3578 |
+ }
|
|
|
8d3578 |
+
|
|
|
8d3578 |
ret = sysdb_set_autofsmap_attr(domain, name,
|
|
|
8d3578 |
sys_attrs, SYSDB_MOD_REP);
|
|
|
8d3578 |
+ if (ret != EOK) {
|
|
|
8d3578 |
+ DEBUG(SSSDBG_MINOR_FAILURE, "Could not invalidate "
|
|
|
8d3578 |
+ "autofs map %s\n", name);
|
|
|
8d3578 |
+ break;
|
|
|
8d3578 |
+ }
|
|
|
8d3578 |
+
|
|
|
8d3578 |
+ ret = sysdb_invalidate_autofs_entries(domain, name);
|
|
|
8d3578 |
break;
|
|
|
8d3578 |
case TYPE_SSH_HOST:
|
|
|
8d3578 |
#ifdef BUILD_SSH
|
|
|
8d3578 |
--
|
|
|
8d3578 |
2.20.1
|
|
|
8d3578 |
|