[389-commits] ldap/servers

Mark Reynolds mreynolds at fedoraproject.org
Thu Apr 12 17:55:23 UTC 2012


 ldap/servers/slapd/pw.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit b5d3cf1c0d974bab391ce125795da947b895f884
Author: Mark Reynolds <mareynol at redhat.com>
Date:   Thu Apr 12 12:55:54 2012 -0400

    Ticket #183 - passwordMaxFailure should lockout password one sooner
    
    Bug Description:  Forgot to account for password policy subentries, and the legacy
                      policy was being disabled.
    
    Fix Description:  When creating a new subentry passwqord poliocy, set the default to
                      on, and then check if we disabled it.
    
    https://fedorahosted.org/389/ticket/183

diff --git a/ldap/servers/slapd/pw.c b/ldap/servers/slapd/pw.c
index 0dac10b..2496c71 100644
--- a/ldap/servers/slapd/pw.c
+++ b/ldap/servers/slapd/pw.c
@@ -1622,6 +1622,9 @@ new_passwdPolicy(Slapi_PBlock *pb, const char *dn)
 				goto done;
 			}
         
+			/* set the default passwordLegacyPolicy setting */
+			pwdpolicy->pw_is_legacy = 1;
+
 			for (slapi_entry_first_attr(pw_entry, &attr); attr;
 					slapi_entry_next_attr(pw_entry, attr, &attr))
 			{
@@ -1807,7 +1810,13 @@ new_passwdPolicy(Slapi_PBlock *pb, const char *dn)
 						pw_name2scheme((char*)slapi_value_get_string(*sval));
 					}
 				}
-                        
+				else
+				if (!strcasecmp(attr_name, "passwordLegacyPolicy")) {
+					if ((sval = attr_get_present_values(attr))) {
+						pwdpolicy->pw_is_legacy =
+						pw_boolean_str2value(slapi_value_get_string(*sval));
+					}
+				}
 			} /* end of for() loop */
 			if (pw_entry) {
 				slapi_entry_free(pw_entry);




More information about the 389-commits mailing list