[Fedora-directory-commits] ldapserver/ldap/servers/slapd pw_mgmt.c, 1.8, 1.9

Noriko Hosoi (nhosoi) fedora-directory-commits at redhat.com
Wed Mar 7 22:06:21 UTC 2007


Author: nhosoi

Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20317

Modified Files:
	pw_mgmt.c 
Log Message:
Resolves: 229513
Summary: CRM #1160370 RHDS does not reset passwordRetryCount to 0 upon a successful BIND
Change: If password lockout is on, need_new_pw from the successful bind tries 
to set passwordRetryCount to 0 in smods, but if passwordExpirationTime is not 
set and password never expires, the smods is not applied and discarded.  Added
pw_apply_mods if password lockout is on.



Index: pw_mgmt.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/pw_mgmt.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- pw_mgmt.c	27 Feb 2007 02:57:30 -0000	1.8
+++ pw_mgmt.c	7 Mar 2007 22:06:19 -0000	1.9
@@ -95,12 +95,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 **)&timestring);
 			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);
@@ -109,7 +111,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 ) {




More information about the Fedora-directory-commits mailing list