summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2014-02-11 22:51:48 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-02-17 20:58:16 +0100
commita5910c05a1013c9a050f6df3d4c6884e894bf2d9 (patch)
tree7a3bc97de882928253dab23bf6127e439ddc6b74
parent97616c8e1ab41c72c509a31626fafcfb07241a46 (diff)
downloadsssd-a5910c05a1013c9a050f6df3d4c6884e894bf2d9.tar.gz
sssd-a5910c05a1013c9a050f6df3d4c6884e894bf2d9.tar.xz
sssd-a5910c05a1013c9a050f6df3d4c6884e894bf2d9.zip
SSS_CACHE: Reset the initgroups attribute when resetting users
(cherry picked from commit 30ee051025753b63ceb19d3b83c44019a19554a1) Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
-rw-r--r--src/tools/sss_cache.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/sss_cache.c b/src/tools/sss_cache.c
index 56dc47afd..59b36db3e 100644
--- a/src/tools/sss_cache.c
+++ b/src/tools/sss_cache.c
@@ -424,6 +424,12 @@ static errno_t invalidate_entry(TALLOC_CTX *ctx, struct sysdb_ctx *sysdb,
if (ret == EOK) {
switch (entry_type) {
case TYPE_USER:
+ /* For users, we also need to reset the initgroups
+ * cache expiry */
+ ret = sysdb_attrs_add_time_t(sys_attrs,
+ SYSDB_INITGR_EXPIRE, 1);
+ if (ret != EOK) return ret;
+
ret = sysdb_set_user_attr(sysdb, domain, name, sys_attrs,
SYSDB_MOD_REP);
break;