summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2014-12-09 17:48:46 +0100
committerJakub Hrozek <jhrozek@redhat.com>2015-01-14 12:06:32 +0100
commit5730f53f1fd47a2a485593048adf540c66d09934 (patch)
treed4f5e10b006173e465e2409fa7de0e74f2e50573
parent04455af12b45a4790039e3655467cf164799c627 (diff)
downloadsssd-5730f53f1fd47a2a485593048adf540c66d09934.tar.gz
sssd-5730f53f1fd47a2a485593048adf540c66d09934.tar.xz
sssd-5730f53f1fd47a2a485593048adf540c66d09934.zip
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. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> (cherry picked from commit 62d919aea98edd1095f6a22241903d4c045b46ed)
-rw-r--r--src/providers/ipa/ipa_s2n_exop.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c
index 0aa12f371..e7c2d9bb9 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;