[SSSD] [PATCHES] SDAP: Set initgroups expire attribute at the end
Pavel Březina
pbrezina at redhat.com
Mon May 18 09:28:28 UTC 2015
On 05/15/2015 03:54 PM, Lukas Slebodnik wrote:
> ehlo,
>
> 2nd and 3rd patch fixes https://fedorahosted.org/sssd/ticket/2634
>
> Steps to reproduce are written in upstream and downstream ticket.
> Patches are quite small so it should be clear from patches
> how to reproduce bug.
>
> LS
#0001: Ack
#0002: Ack
#0003:
+ cache_timeout = domain->user_timeout;
+
+ ret = sysdb_attrs_add_time_t(attrs, SYSDB_INITGR_EXPIRE,
+ (cache_timeout ?
+ (time(NULL) + cache_timeout) : 0));
+ if (ret != EOK) {
+ DEBUG(SSSDBG_CRIT_FAILURE, "Could not set up attrs\n");
+ goto done;
+ }
Can you move the condition outside the function parameter?
cache_timeout = domain->user_timeout ? time(NULL) + domain->user_timeout
: 0;
if (is_initgr) {
- ret = sysdb_attrs_add_time_t(user_attrs, SYSDB_INITGR_EXPIRE,
- (cache_timeout ?
- (time(NULL) + cache_timeout) : 0));
+ ret = sysdb_attrs_add_time_t(user_attrs, SYSDB_INITGR_EXPIRE, 0);
if (ret) {
goto done;
Can you explain this step? You are removing this code in the next patch
but I would expect it to be removed here already.
#0004: Ack.
More information about the sssd-devel
mailing list