]> git.sur5r.net Git - openldap/commitdiff
reset passwords before freeindg them
authorPierangelo Masarati <ando@openldap.org>
Fri, 18 Apr 2003 10:02:43 +0000 (10:02 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 18 Apr 2003 10:02:43 +0000 (10:02 +0000)
servers/slapd/back-ldap/bind.c
servers/slapd/back-ldap/init.c

index 4497971d61d7186b79bf6980af88f6c7428fb5c1..4ddaa1a7938edab9c849c9d06bdee42153806e0a 100644 (file)
@@ -106,8 +106,10 @@ ldap_back_bind(
                mdn.bv_val = NULL;
 
                if ( li->savecred ) {
-                       if ( lc->cred.bv_val )
+                       if ( lc->cred.bv_val ) {
+                               memset( lc->cred.bv_val, 0, lc->cred.bv_len );
                                ch_free( lc->cred.bv_val );
+                       }
                        ber_dupbv( &lc->cred, &op->oq_bind.rb_cred );
                        ldap_set_rebind_proc( lc->ld, ldap_back_rebind, lc );
                }
index efa8b88a4e370c0278831446642b42732c1cd0b1..f2a71e0ebb845473160623cd91aadf0b01760df9 100644 (file)
@@ -147,6 +147,7 @@ ldap_back_conn_free(
                ch_free( lc->bound_dn.bv_val );
        }
        if ( lc->cred.bv_val ) {
+               memset( lc->cred.bv_val, 0, lc->cred.bv_len );
                ch_free( lc->cred.bv_val );
        }
        if ( lc->local_dn.bv_val ) {