[SSSD] [PATCH] warn user if password is about to expire

Pavel Březina pbrezina at redhat.com
Tue Nov 20 10:18:22 UTC 2012


On 11/19/2012 04:59 PM, Pavel Březina wrote:
> https://fedorahosted.org/sssd/ticket/1638

Self nack.

> -            if (pwd_exp_warning == 0 ||
> -                difftime(now + pwd_exp_warning, ppolicy->expire) > 0.0) {
> +            if (pwd_exp_warning != 0 &&
> +                difftime(pwd_exp_warning, ppolicy->expire) > 0.0) {
>                  goto done;
>              }

We don't need to test if pwd_exp_warning != 0, because if it is 0 then
difftime returns value <= 0 and the condition fails.

New patch is attached.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-warn-user-if-password-is-about-to-expire.patch
Type: text/x-patch
Size: 1707 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20121120/5a496017/attachment.bin>


More information about the sssd-devel mailing list