From 864ed1abd41e4040932d5495f7a88bc5d29ea1dc Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Tue, 9 Dec 2014 17:48:46 +0100 Subject: [PATCH 7/8] IPA: set SYSDB_INITGR_EXPIRE for RESP_USER_GROUPLIST Since RESP_USER_GROUPLIST contains all group memberships it is effectively an initgroups request hence SYSDB_INITGR_EXPIRE will be set. --- src/providers/ipa/ipa_s2n_exop.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c index 0aa12f371e8aa0d58311391a27c668aa929a5b80..e7c2d9bb97908746eb5ab6cacc6fc58d353dea06 100644 --- a/src/providers/ipa/ipa_s2n_exop.c +++ b/src/providers/ipa/ipa_s2n_exop.c @@ -1911,6 +1911,20 @@ static errno_t ipa_s2n_save_objects(struct sss_domain_info *dom, } } + if (attrs->response_type == RESP_USER_GROUPLIST) { + /* Since RESP_USER_GROUPLIST contains all group memberships it + * is effectively an initgroups request hence + * SYSDB_INITGR_EXPIRE will be set.*/ + ret = sysdb_attrs_add_time_t(attrs->sysdb_attrs, + SYSDB_INITGR_EXPIRE, + time(NULL) + timeout); + if (ret != EOK) { + DEBUG(SSSDBG_OP_FAILURE, + "sysdb_attrs_add_time_t failed.\n"); + goto done; + } + } + gid = 0; if (dom->mpg == false) { gid = attrs->a.user.pw_gid; -- 2.1.0