From: Pierangelo Masarati Date: Fri, 18 Apr 2003 10:02:43 +0000 (+0000) Subject: reset passwords before freeindg them X-Git-Tag: OPENLDAP_REL_ENG_2_2_0ALPHA~314 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6bcbe9ad31c8d9078d6ccbb71c9367f31df15b70;p=openldap reset passwords before freeindg them --- diff --git a/servers/slapd/back-ldap/bind.c b/servers/slapd/back-ldap/bind.c index 4497971d61..4ddaa1a793 100644 --- a/servers/slapd/back-ldap/bind.c +++ b/servers/slapd/back-ldap/bind.c @@ -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 ); } diff --git a/servers/slapd/back-ldap/init.c b/servers/slapd/back-ldap/init.c index efa8b88a4e..f2a71e0ebb 100644 --- a/servers/slapd/back-ldap/init.c +++ b/servers/slapd/back-ldap/init.c @@ -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 ) {