summaryrefslogtreecommitdiffstats
path: root/src/db
diff options
context:
space:
mode:
authorFabiano FidĂȘncio <fidencio@redhat.com>2017-05-29 13:32:59 +0200
committerJakub Hrozek <jhrozek@redhat.com>2017-06-15 11:01:41 +0200
commit9883d1e2913ff0c1db479f1ece8148e03155c7f3 (patch)
tree88829fd7096368c2c29ac66716390584b4d02768 /src/db
parent8ad57e17779b3ec60246ac58c1691ee15745084c (diff)
downloadsssd-9883d1e2913ff0c1db479f1ece8148e03155c7f3.tar.gz
sssd-9883d1e2913ff0c1db479f1ece8148e03155c7f3.tar.xz
sssd-9883d1e2913ff0c1db479f1ece8148e03155c7f3.zip
SYSDB_OPS: Mark an entry as expired also in the timestamp cache
As the cleanup task will start using new methods for searching the users and groups which have to be cleaned up, SSSD starts relying more in a more consistent state of the timestamp cache on pretty much everything related to the cleanup task. One of the things that would cause SSSD some problems is not having the ghost user expired in the persistent cache but not in the timestamp cache. With this patch, the entry is also expired in the timestamp cache when it's present. Related: https://pagure.io/SSSD/sssd/issue/3369 Signed-off-by: Fabiano FidĂȘncio <fidencio@redhat.com> Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/db')
-rw-r--r--src/db/sysdb_ops.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 12f8095d2..ae2647048 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -5065,6 +5065,15 @@ errno_t sysdb_mark_entry_as_expired_ldb_dn(struct sss_domain_info *dom,
goto done;
}
+ if (dom->sysdb->ldb_ts != NULL) {
+ ret = ldb_modify(dom->sysdb->ldb_ts, msg);
+ if (ret != LDB_SUCCESS) {
+ DEBUG(SSSDBG_MINOR_FAILURE,
+ "Could not mark an entry as expired in the timestamp cache\n");
+ /* non-fatal */
+ }
+ }
+
ret = EOK;
done: