diff options
author | Fabiano FidĂȘncio <fidencio@redhat.com> | 2017-05-29 13:29:26 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2017-06-15 11:01:45 +0200 |
commit | a71f1a655dcc2ca6dc16bb8eb1c4c9e24cfe2c3e (patch) | |
tree | cca76b9d079c988a9d9e0545eab6b1e6700e7476 /src/db | |
parent | 9883d1e2913ff0c1db479f1ece8148e03155c7f3 (diff) | |
download | sssd-a71f1a655dcc2ca6dc16bb8eb1c4c9e24cfe2c3e.tar.gz sssd-a71f1a655dcc2ca6dc16bb8eb1c4c9e24cfe2c3e.tar.xz sssd-a71f1a655dcc2ca6dc16bb8eb1c4c9e24cfe2c3e.zip |
SYSDB_OPS: Invalidate a cache entry also in the ts_cache
Similarly to what has been in the previous commit (expiring an entry
also in the timestamp cache), we should do the same when invalidating an
entry.
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.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c index ae2647048..ed936f0cb 100644 --- a/src/db/sysdb_ops.c +++ b/src/db/sysdb_ops.c @@ -5160,6 +5160,17 @@ int sysdb_invalidate_cache_entry(struct sss_domain_info *domain, goto done; } + if (sysdb->ldb_ts != NULL) { + ret = sysdb_set_cache_entry_attr(sysdb->ldb_ts, entry_dn, + attrs, SYSDB_MOD_REP); + if (ret != EOK) { + DEBUG(SSSDBG_MINOR_FAILURE, + "Cannot set attrs in the timestamp cache for %s, %d [%s]\n", + ldb_dn_get_linearized(entry_dn), ret, sss_strerror(ret)); + /* non-fatal */ + } + } + DEBUG(SSSDBG_FUNC_DATA, "Cache entry [%s] has been invalidated.\n", ldb_dn_get_linearized(entry_dn)); |