diff options
author | Fabiano Fidêncio <fidencio@redhat.com> | 2016-08-24 13:29:17 +0200 |
---|---|---|
committer | Lukas Slebodnik <lslebodn@redhat.com> | 2016-08-27 10:00:03 +0200 |
commit | 221d70ae3c5b7bc7384f57ffd3f88f89a3e6ae6a (patch) | |
tree | d06c040ce34e519bb5de17ef411437a49e0598e8 | |
parent | 2537fe318a3866780abca100cf6eb7c258f9d02b (diff) | |
download | sssd-221d70ae3c5b7bc7384f57ffd3f88f89a3e6ae6a.tar.gz sssd-221d70ae3c5b7bc7384f57ffd3f88f89a3e6ae6a.tar.xz sssd-221d70ae3c5b7bc7384f57ffd3f88f89a3e6ae6a.zip |
PROXY: Remove cache_timeout attribute from save_group()
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>
-rw-r--r-- | src/providers/proxy/proxy_id.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/providers/proxy/proxy_id.c b/src/providers/proxy/proxy_id.c index bdcac6631..c4d68f8e6 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 */ |