Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5623
Modified Files:
Tag: Directory71RtmBranch
pw_mgmt.c
Log Message:
Resolves: #229513
Summary: CRM #1160370 RHDS does not reset passwordRetryCount to 0 upon a successful BIND
Note: applying the fixes in HEAD to Directory71RtmBranch
Index: pw_mgmt.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/pw_mgmt.c,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -r1.6 -r1.6.2.1
--- pw_mgmt.c 19 Apr 2005 22:07:36 -0000 1.6
+++ pw_mgmt.c 22 Dec 2007 00:32:08 -0000 1.6.2.1
@@ -67,9 +67,9 @@
pwpolicy = new_passwdPolicy(pb, dn);
/* after the user binds with authentication, clear the retry count */
- if ( pwpolicy->pw_lockout == 1)
+ if (pwpolicy->pw_lockout == 1)
{
- if(slapi_entry_attr_get_int( e, "passwordRetryCount") > 0)
+ if(slapi_entry_attr_get_int(e, "passwordRetryCount") > 0)
{
slapi_mods_add_string(&smods, LDAP_MOD_REPLACE, "passwordRetryCount",
"0");
}
@@ -90,12 +90,14 @@
pw_exp_date = time_plus_sec ( cur_time,
pwpolicy->pw_maxage );
- timestring = format_genTime (pw_exp_date);
+ timestring = format_genTime (pw_exp_date);
slapi_mods_add_string(&smods, LDAP_MOD_REPLACE,
"passwordExpirationTime", timestring);
slapi_ch_free((void **)×tring);
slapi_mods_add_string(&smods, LDAP_MOD_REPLACE, "passwordExpWarned",
"0");
pw_apply_mods(dn, &smods);
+ } else if (pwpolicy->pw_lockout == 1) {
+ pw_apply_mods(dn, &smods);
}
slapi_mods_done(&smods);
delete_passwdPolicy(&pwpolicy);
@@ -104,7 +106,7 @@
pw_exp_date = parse_genTime(passwordExpirationTime);
- slapi_ch_free((void**)&passwordExpirationTime);
+ slapi_ch_free((void**)&passwordExpirationTime);
/* Check if password has been reset */
if ( pw_exp_date == NO_TIME ) {
Show replies by date