From 4914ea313d34d894d78e4fda101f26d668c61116 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 30 May 2005 14:49:47 +0000 Subject: [PATCH] fix ITS#3753 --- servers/slapd/passwd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/servers/slapd/passwd.c b/servers/slapd/passwd.c index 0480f3216c..270b1148b2 100644 --- a/servers/slapd/passwd.c +++ b/servers/slapd/passwd.c @@ -78,10 +78,9 @@ int passwd_extop( return rs->sr_err; } - if ( id.bv_len ) { - ber_dupbv_x( &op->o_req_dn, &id, op->o_tmpmemctx ); - /* ndn is in tmpmem, so we don't need to free it */ - rs->sr_err = dnNormalize( 0, NULL, NULL, &id, &op->o_req_ndn, op->o_tmpmemctx ); + if ( !BER_BVISEMPTY( &id ) ) { + rs->sr_err = dnPrettyNormal( NULL, &id, &op->o_req_dn, + &op->o_req_ndn, op->o_tmpmemctx ); if ( rs->sr_err != LDAP_SUCCESS ) { rs->sr_text = "Invalid DN"; rc = rs->sr_err; @@ -315,7 +314,7 @@ int slap_passwd_parse( struct berval *reqdata, goto decoding_error; } - tag = ber_peek_tag( ber, &len); + tag = ber_peek_tag( ber, &len ); } if( tag == LDAP_TAG_EXOP_MODIFY_PASSWD_OLD ) { -- 2.39.5