From e2191e5f0093d305f3cdb6f68e5a287ad6822c9e Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 11 Feb 2014 22:51:48 +0100 Subject: SSS_CACHE: Reset the initgroups attribute when resetting users MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 30ee051025753b63ceb19d3b83c44019a19554a1) Reviewed-by: Lukáš Slebodník --- src/tools/sss_cache.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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; -- cgit