mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
kdb: The jitter offset should always be positive
Otherwise the resulting value could be outside the valid bounds of the time value. Related: https://pagure.io/freeipa/issue/9121 Signed-off-by: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
parent
2282509934
commit
62807654a0
@ -40,7 +40,7 @@ jitter(krb5_deltat baseline, krb5_deltat *lifetime_out)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
*lifetime_out = baseline - offset % JITTER_WINDOW_SECONDS;
|
*lifetime_out = baseline - abs(offset) % JITTER_WINDOW_SECONDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static krb5_error_code
|
static krb5_error_code
|
||||||
|
Loading…
Reference in New Issue
Block a user