2b61bbee11
- Resolves: upstream #3154 - sssd exits if clock is adjusted backwards after boot - Resolves: upstream #3163 - resolving IPA nested user group is broken in 1.14
77 lines
3.2 KiB
Diff
77 lines
3.2 KiB
Diff
From c919d358561f4b26b4017f4379fc7b9b791f5cd8 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fidencio@redhat.com>
|
|
Date: Wed, 24 Aug 2016 13:29:17 +0200
|
|
Subject: [PATCH 17/39] PROXY: Remove cache_timeout attribute from save_group()
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
As this function already receives a struct sss_domain_info * parameter
|
|
as argument, we can simply get the cache_timeout attribute by accessing
|
|
domain->group_timeout.
|
|
|
|
Related:
|
|
https://fedorahosted.org/sssd/ticket/3134
|
|
|
|
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
|
|
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
|
|
(cherry picked from commit 221d70ae3c5b7bc7384f57ffd3f88f89a3e6ae6a)
|
|
---
|
|
src/providers/proxy/proxy_id.c | 12 +++++-------
|
|
1 file changed, 5 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/src/providers/proxy/proxy_id.c b/src/providers/proxy/proxy_id.c
|
|
index bdcac66319897981c21e7fd7da7334ee97d010f6..c4d68f8e6855941dda386658758c37b4c9080712 100644
|
|
--- a/src/providers/proxy/proxy_id.c
|
|
+++ b/src/providers/proxy/proxy_id.c
|
|
@@ -558,8 +558,7 @@ static errno_t proxy_process_missing_users(struct sysdb_ctx *sysdb,
|
|
static int save_group(struct sysdb_ctx *sysdb, struct sss_domain_info *dom,
|
|
struct group *grp,
|
|
const char *real_name, /* already qualified */
|
|
- const char *alias, /* already qualified */
|
|
- uint64_t cache_timeout)
|
|
+ const char *alias) /* already qualified */
|
|
{
|
|
errno_t ret, sret;
|
|
struct sysdb_attrs *attrs = NULL;
|
|
@@ -664,7 +663,7 @@ static int save_group(struct sysdb_ctx *sysdb, struct sss_domain_info *dom,
|
|
real_name,
|
|
grp->gr_gid,
|
|
attrs,
|
|
- cache_timeout,
|
|
+ dom->group_timeout,
|
|
now);
|
|
if (ret) {
|
|
DEBUG(SSSDBG_OP_FAILURE, "Could not add group to cache\n");
|
|
@@ -947,7 +946,7 @@ static int get_gr_name(struct proxy_id_ctx *ctx,
|
|
goto done;
|
|
}
|
|
|
|
- ret = save_group(sysdb, dom, grp, real_name, i_name, dom->group_timeout);
|
|
+ ret = save_group(sysdb, dom, grp, real_name, i_name);
|
|
if (ret) {
|
|
DEBUG(SSSDBG_OP_FAILURE,
|
|
"Cannot save group [%d]: %s\n", ret, strerror(ret));
|
|
@@ -1032,7 +1031,7 @@ static int get_gr_gid(TALLOC_CTX *mem_ctx,
|
|
goto done;
|
|
}
|
|
|
|
- ret = save_group(sysdb, dom, grp, name, NULL, dom->group_timeout);
|
|
+ ret = save_group(sysdb, dom, grp, name, NULL);
|
|
if (ret) {
|
|
DEBUG(SSSDBG_OP_FAILURE,
|
|
"Cannot save user [%d]: %s\n", ret, strerror(ret));
|
|
@@ -1165,8 +1164,7 @@ static int enum_groups(TALLOC_CTX *mem_ctx,
|
|
"Ignoring\n");
|
|
ret = ENOMEM;
|
|
}
|
|
- ret = save_group(sysdb, dom, grp, name,
|
|
- NULL, dom->group_timeout);
|
|
+ ret = save_group(sysdb, dom, grp, name, NULL);
|
|
if (ret) {
|
|
/* Do not fail completely on errors.
|
|
* Just report the failure to save and go on */
|
|
--
|
|
2.9.3
|
|
|