|
|
6f51e1 |
From 1ec56936d29985a55f9529c1ea3e71056557b3ff Mon Sep 17 00:00:00 2001
|
|
|
6f51e1 |
From: Mark Reynolds <mreynolds@redhat.com>
|
|
|
6f51e1 |
Date: Fri, 1 Sep 2017 09:24:55 -0400
|
|
|
6f51e1 |
Subject: [PATCH] Ticket 49370 - local password policies should use the same
|
|
|
6f51e1 |
defaults as the global policy
|
|
|
6f51e1 |
|
|
|
6f51e1 |
Description: When a local password policy (subtree/user) is created it does not use
|
|
|
6f51e1 |
the same defaults as the global policy. This causes inconsistent behavior.
|
|
|
6f51e1 |
|
|
|
6f51e1 |
https://pagure.io/389-ds-base/issue/49370
|
|
|
6f51e1 |
|
|
|
6f51e1 |
Reviewed by: firstyear(Thanks!)
|
|
|
6f51e1 |
---
|
|
|
6f51e1 |
ldap/servers/slapd/pw.c | 21 +++++++++++++++++++++
|
|
|
6f51e1 |
1 file changed, 21 insertions(+)
|
|
|
6f51e1 |
|
|
|
6f51e1 |
diff --git a/ldap/servers/slapd/pw.c b/ldap/servers/slapd/pw.c
|
|
|
6f51e1 |
index 378d148..19a863a 100644
|
|
|
6f51e1 |
--- a/ldap/servers/slapd/pw.c
|
|
|
6f51e1 |
+++ b/ldap/servers/slapd/pw.c
|
|
|
6f51e1 |
@@ -1768,6 +1768,27 @@ new_passwdPolicy(Slapi_PBlock *pb, const char *dn)
|
|
|
6f51e1 |
goto done;
|
|
|
6f51e1 |
}
|
|
|
6f51e1 |
|
|
|
6f51e1 |
+ /* Set the default values */
|
|
|
6f51e1 |
+ pwdpolicy->pw_mintokenlength = SLAPD_DEFAULT_PW_MINTOKENLENGTH;
|
|
|
6f51e1 |
+ pwdpolicy->pw_minlength = SLAPD_DEFAULT_PW_MINLENGTH;
|
|
|
6f51e1 |
+ pwdpolicy->pw_mindigits = SLAPD_DEFAULT_PW_MINDIGITS;
|
|
|
6f51e1 |
+ pwdpolicy->pw_minalphas = SLAPD_DEFAULT_PW_MINALPHAS;
|
|
|
6f51e1 |
+ pwdpolicy->pw_minuppers = SLAPD_DEFAULT_PW_MINUPPERS;
|
|
|
6f51e1 |
+ pwdpolicy->pw_minlowers = SLAPD_DEFAULT_PW_MINLOWERS;
|
|
|
6f51e1 |
+ pwdpolicy->pw_minspecials = SLAPD_DEFAULT_PW_MINSPECIALS;
|
|
|
6f51e1 |
+ pwdpolicy->pw_min8bit = SLAPD_DEFAULT_PW_MIN8BIT;
|
|
|
6f51e1 |
+ pwdpolicy->pw_maxrepeats = SLAPD_DEFAULT_PW_MAXREPEATS;
|
|
|
6f51e1 |
+ pwdpolicy->pw_mincategories = SLAPD_DEFAULT_PW_MINCATEGORIES;
|
|
|
6f51e1 |
+ pwdpolicy->pw_mintokenlength = SLAPD_DEFAULT_PW_MINTOKENLENGTH;
|
|
|
6f51e1 |
+ pwdpolicy->pw_maxage = SLAPD_DEFAULT_PW_MAXAGE;
|
|
|
6f51e1 |
+ pwdpolicy->pw_minage = SLAPD_DEFAULT_PW_MINAGE;
|
|
|
6f51e1 |
+ pwdpolicy->pw_warning = SLAPD_DEFAULT_PW_WARNING;
|
|
|
6f51e1 |
+ pwdpolicy->pw_inhistory = SLAPD_DEFAULT_PW_INHISTORY;
|
|
|
6f51e1 |
+ pwdpolicy->pw_maxfailure = SLAPD_DEFAULT_PW_MAXFAILURE;
|
|
|
6f51e1 |
+ pwdpolicy->pw_lockduration = SLAPD_DEFAULT_PW_LOCKDURATION;
|
|
|
6f51e1 |
+ pwdpolicy->pw_resetfailurecount = SLAPD_DEFAULT_PW_RESETFAILURECOUNT;
|
|
|
6f51e1 |
+ pwdpolicy->pw_gracelimit = SLAPD_DEFAULT_PW_GRACELIMIT;
|
|
|
6f51e1 |
+
|
|
|
6f51e1 |
/* set the default passwordLegacyPolicy setting */
|
|
|
6f51e1 |
pwdpolicy->pw_is_legacy = 1;
|
|
|
6f51e1 |
|
|
|
6f51e1 |
--
|
|
|
6f51e1 |
2.9.5
|
|
|
6f51e1 |
|