]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/passwd.c
apparently, structural_class() args changed
[openldap] / servers / slapd / passwd.c
index 90d666dd8f2994ca29bdc36e459d62edeff2fd87..ebb98e23c0573c225745c3fd18e479e2636235a2 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)