]> git.sur5r.net Git - openldap/commitdiff
ITS#4148 fix replica mods
authorHoward Chu <hyc@openldap.org>
Sat, 5 Nov 2005 08:50:16 +0000 (08:50 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 5 Nov 2005 08:50:16 +0000 (08:50 +0000)
servers/slapd/overlays/ppolicy.c

index e543a4857586ab287143db8353d74ab39296a804..c2d7fe65ac2a461ccbfea37a91730c5393c730d7 100644 (file)
@@ -1186,8 +1186,7 @@ ppolicy_modify( Operation *op, SlapReply *rs )
                a_lock = attr_find( e->e_attrs, ad_pwdAccountLockedTime );
                a_fail = attr_find( e->e_attrs, ad_pwdFailureTime );
 
-               for( prev = &op->oq_modify.rs_modlist, ml = *prev; ml;
-                       prev = &ml->sml_next, ml = *prev ) {
+               for( prev = &op->oq_modify.rs_modlist, ml = *prev; ml; ml = *prev ) {
 
                        if ( ml->sml_desc == slap_schema.si_ad_userPassword )
                                got_pw = 1;
@@ -1217,8 +1216,10 @@ ppolicy_modify( Operation *op, SlapReply *rs )
                                        *prev = ml->sml_next;
                                        ml->sml_next = NULL;
                                        slap_mods_free( ml, 1 );
+                                       continue;
                                }
                        }
+                       prev = &ml->sml_next;
                }
 
                /* If we're resetting the password, make sure grace, accountlock,