From 6bcbe9ad31c8d9078d6ccbb71c9367f31df15b70 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Fri, 18 Apr 2003 10:02:43 +0000 Subject: [PATCH] reset passwords before freeindg them --- servers/slapd/back-ldap/bind.c | 4 +++- servers/slapd/back-ldap/init.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) 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 ) { -- 2.39.5