|
|
bb7cd1 |
From 256e1b4162832570e10a85579d2b14ed7b54b7f2 Mon Sep 17 00:00:00 2001
|
|
|
bb7cd1 |
From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fidencio@redhat.com>
|
|
|
bb7cd1 |
Date: Mon, 29 May 2017 13:29:26 +0200
|
|
|
bb7cd1 |
Subject: [PATCH 179/181] SYSDB_OPS: Invalidate a cache entry also in the
|
|
|
bb7cd1 |
ts_cache
|
|
|
bb7cd1 |
MIME-Version: 1.0
|
|
|
bb7cd1 |
Content-Type: text/plain; charset=UTF-8
|
|
|
bb7cd1 |
Content-Transfer-Encoding: 8bit
|
|
|
bb7cd1 |
|
|
|
bb7cd1 |
Similarly to what has been in the previous commit (expiring an entry
|
|
|
bb7cd1 |
also in the timestamp cache), we should do the same when invalidating an
|
|
|
bb7cd1 |
entry.
|
|
|
bb7cd1 |
|
|
|
bb7cd1 |
Related:
|
|
|
bb7cd1 |
https://pagure.io/SSSD/sssd/issue/3369
|
|
|
bb7cd1 |
|
|
|
bb7cd1 |
Signed-off-by: Fabiano FidĂȘncio <fidencio@redhat.com>
|
|
|
bb7cd1 |
|
|
|
bb7cd1 |
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
bb7cd1 |
(cherry picked from commit a71f1a655dcc2ca6dc16bb8eb1c4c9e24cfe2c3e)
|
|
|
bb7cd1 |
---
|
|
|
bb7cd1 |
src/db/sysdb_ops.c | 11 +++++++++++
|
|
|
bb7cd1 |
1 file changed, 11 insertions(+)
|
|
|
bb7cd1 |
|
|
|
bb7cd1 |
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
|
|
|
bb7cd1 |
index ae26470487f859fe1de1dc364b6a05b9793a0545..ed936f0cb1a37155aabef96db1d267eb03ec0ed9 100644
|
|
|
bb7cd1 |
--- a/src/db/sysdb_ops.c
|
|
|
bb7cd1 |
+++ b/src/db/sysdb_ops.c
|
|
|
bb7cd1 |
@@ -5160,6 +5160,17 @@ int sysdb_invalidate_cache_entry(struct sss_domain_info *domain,
|
|
|
bb7cd1 |
goto done;
|
|
|
bb7cd1 |
}
|
|
|
bb7cd1 |
|
|
|
bb7cd1 |
+ if (sysdb->ldb_ts != NULL) {
|
|
|
bb7cd1 |
+ ret = sysdb_set_cache_entry_attr(sysdb->ldb_ts, entry_dn,
|
|
|
bb7cd1 |
+ attrs, SYSDB_MOD_REP);
|
|
|
bb7cd1 |
+ if (ret != EOK) {
|
|
|
bb7cd1 |
+ DEBUG(SSSDBG_MINOR_FAILURE,
|
|
|
bb7cd1 |
+ "Cannot set attrs in the timestamp cache for %s, %d [%s]\n",
|
|
|
bb7cd1 |
+ ldb_dn_get_linearized(entry_dn), ret, sss_strerror(ret));
|
|
|
bb7cd1 |
+ /* non-fatal */
|
|
|
bb7cd1 |
+ }
|
|
|
bb7cd1 |
+ }
|
|
|
bb7cd1 |
+
|
|
|
bb7cd1 |
DEBUG(SSSDBG_FUNC_DATA,
|
|
|
bb7cd1 |
"Cache entry [%s] has been invalidated.\n",
|
|
|
bb7cd1 |
ldb_dn_get_linearized(entry_dn));
|
|
|
bb7cd1 |
--
|
|
|
bb7cd1 |
2.9.4
|
|
|
bb7cd1 |
|