Blame SOURCES/0005-Ticket-50091-shadowWarning-is-not-generated-if-passw.patch
|
|
26521d |
From 576774dc7cc0f7af7505f0f1a19b52e3c84c6625 Mon Sep 17 00:00:00 2001
|
|
|
26521d |
From: Thierry Bordaz <tbordaz@redhat.com>
|
|
|
26521d |
Date: Fri, 14 Dec 2018 17:42:22 +0100
|
|
|
26521d |
Subject: [PATCH] Ticket 50091 - shadowWarning is not generated if
|
|
|
26521d |
passwordWarning is lower than 86400 seconds (1 day)
|
|
|
26521d |
|
|
|
26521d |
Bug Description:
|
|
|
26521d |
For a shadowAccount, if a password policy defines passwordWarning below 1 days (86400 seconds)
|
|
|
26521d |
then the shadowWarning (in day) is not returned from the entry. In such case its value is '0'.
|
|
|
26521d |
|
|
|
26521d |
Fix Description:
|
|
|
26521d |
The fix is to accept shadowWarning = 0 as valid value and return it
|
|
|
26521d |
|
|
|
26521d |
https://pagure.io/389-ds-base/issue/50091
|
|
|
26521d |
|
|
|
26521d |
Reviewed by: Mark Reynolds
|
|
|
26521d |
|
|
|
26521d |
Platforms tested: F27
|
|
|
26521d |
|
|
|
26521d |
Flag Day: no
|
|
|
26521d |
|
|
|
26521d |
Doc impact: no
|
|
|
26521d |
---
|
|
|
26521d |
ldap/servers/slapd/pw.c | 2 +-
|
|
|
26521d |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
26521d |
|
|
|
26521d |
diff --git a/ldap/servers/slapd/pw.c b/ldap/servers/slapd/pw.c
|
|
|
26521d |
index ec23ed1a5..11149f51a 100644
|
|
|
26521d |
--- a/ldap/servers/slapd/pw.c
|
|
|
26521d |
+++ b/ldap/servers/slapd/pw.c
|
|
|
26521d |
@@ -2844,7 +2844,7 @@ add_shadow_ext_password_attrs(Slapi_PBlock *pb, Slapi_Entry **e)
|
|
|
26521d |
shadowval = _MAX_SHADOW;
|
|
|
26521d |
}
|
|
|
26521d |
}
|
|
|
26521d |
- if (shadowval > 0) {
|
|
|
26521d |
+ if (shadowval >= 0) {
|
|
|
26521d |
shwarn = slapi_entry_attr_get_charptr(*e, "shadowWarning");
|
|
|
26521d |
if (shwarn) {
|
|
|
26521d |
sval = strtoll(shwarn, NULL, 0);
|
|
|
26521d |
--
|
|
|
26521d |
2.17.2
|
|
|
26521d |
|