Blame SOURCES/0085-SSS_CACHE-Reset-the-initgroups-attribute-when-resett.patch

2fc102
From a5910c05a1013c9a050f6df3d4c6884e894bf2d9 Mon Sep 17 00:00:00 2001
2fc102
From: Jakub Hrozek <jhrozek@redhat.com>
2fc102
Date: Tue, 11 Feb 2014 22:51:48 +0100
2fc102
Subject: [PATCH 85/88] SSS_CACHE: Reset the initgroups attribute when
2fc102
 resetting users
2fc102
MIME-Version: 1.0
2fc102
Content-Type: text/plain; charset=UTF-8
2fc102
Content-Transfer-Encoding: 8bit
2fc102
2fc102
(cherry picked from commit 30ee051025753b63ceb19d3b83c44019a19554a1)
2fc102
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
2fc102
---
2fc102
 src/tools/sss_cache.c | 6 ++++++
2fc102
 1 file changed, 6 insertions(+)
2fc102
2fc102
diff --git a/src/tools/sss_cache.c b/src/tools/sss_cache.c
2fc102
index 56dc47afdcb92b71dc1ef71d7f26fdf276a1c45f..59b36db3e25333f4ca5da241b607edda226b929f 100644
2fc102
--- a/src/tools/sss_cache.c
2fc102
+++ b/src/tools/sss_cache.c
2fc102
@@ -424,6 +424,12 @@ static errno_t invalidate_entry(TALLOC_CTX *ctx, struct sysdb_ctx *sysdb,
2fc102
         if (ret == EOK) {
2fc102
             switch (entry_type) {
2fc102
                 case TYPE_USER:
2fc102
+                    /* For users, we also need to reset the initgroups
2fc102
+                     * cache expiry */
2fc102
+                    ret = sysdb_attrs_add_time_t(sys_attrs,
2fc102
+                            SYSDB_INITGR_EXPIRE, 1);
2fc102
+                    if (ret != EOK) return ret;
2fc102
+
2fc102
                     ret = sysdb_set_user_attr(sysdb, domain, name, sys_attrs,
2fc102
                                               SYSDB_MOD_REP);
2fc102
                     break;
2fc102
-- 
2fc102
1.8.5.3
2fc102