]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
complete fix to ITS#4665
authorPierangelo Masarati <ando@openldap.org>
Thu, 26 Oct 2006 23:49:44 +0000 (23:49 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 26 Oct 2006 23:49:44 +0000 (23:49 +0000)
servers/slapd/passwd.c

index 5c4390c3379c56dbd75de4726378f48e44d0954f..26605ac8fb78375eadf6bd536f79d41bff4b23e9 100644 (file)
@@ -282,8 +282,13 @@ old_good:
                                         * if it cares... */
 
                rs->sr_err = op->o_bd->be_modify( op, rs );
+
+               /* be_modify() might have shuffled modifications */
+               qpw->rs_mods = op->orm_modlist;
+
                if ( rs->sr_err == LDAP_SUCCESS ) {
                        rs->sr_rspdata = rsp;
+
                } else if ( rsp ) {
                        ber_bvfree( rsp );
                        rsp = NULL;
@@ -520,8 +525,7 @@ void
 slap_passwd_generate( struct berval *pass )
 {
        Debug( LDAP_DEBUG_TRACE, "slap_passwd_generate\n", 0, 0, 0 );
-       pass->bv_val = NULL;
-       pass->bv_len = 0;
+       BER_BVZERO( pass );
 
        /*
         * generate passwords of only 8 characters as some getpass(3)