代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/openldap 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 14972a7ae1142cccdad6db3ac50ecc47d0ecfa91 Mon Sep 17 00:00:00 2001
From: Howard Chu <hyc@openldap.org>
Date: Thu, 16 Jun 2022 21:32:07 +0100
Subject: [PATCH] ITS#9866 delta-sync: fix DN leak on Adds
---
servers/slapd/syncrepl.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c
index 7707a8945..32e351738 100644
--- a/servers/slapd/syncrepl.c
+++ b/servers/slapd/syncrepl.c
@@ -3114,10 +3114,8 @@ syncrepl_message_to_op(
ch_free( bvals );
goto done;
}
- ber_dupbv( &op->o_req_dn, &dn );
- ber_dupbv( &op->o_req_ndn, &ndn );
- slap_sl_free( ndn.bv_val, op->o_tmpmemctx );
- slap_sl_free( dn.bv_val, op->o_tmpmemctx );
+ op->o_req_dn = dn;
+ op->o_req_ndn = ndn;
freeReqDn = 1;
} else if ( !ber_bvstrcasecmp( &bv, &ls->ls_req ) ) {
int i = verb_to_mask( bvals[0].bv_val, modops );
@@ -3227,9 +3225,8 @@ syncrepl_message_to_op(
if ( op->o_tag == LDAP_REQ_ADD ) {
Entry *e = entry_alloc();
op->ora_e = e;
- op->ora_e->e_name = op->o_req_dn;
- op->ora_e->e_nname = op->o_req_ndn;
- freeReqDn = 0;
+ ber_dupbv( &op->ora_e->e_name, &op->o_req_dn );
+ ber_dupbv( &op->ora_e->e_nname, &op->o_req_ndn );
rc = slap_mods2entry( modlist, &op->ora_e, 1, 0, &text, txtbuf, textlen);
if( rc != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_ANY, "syncrepl_message_to_op: %s "
@@ -3373,8 +3370,8 @@ done:
op->o_tmpfree( op->orr_nnewDN.bv_val, op->o_tmpmemctx );
}
if ( freeReqDn ) {
- ch_free( op->o_req_ndn.bv_val );
- ch_free( op->o_req_dn.bv_val );
+ op->o_tmpfree( op->o_req_ndn.bv_val, op->o_tmpmemctx );
+ op->o_tmpfree( op->o_req_dn.bv_val, op->o_tmpmemctx );
}
ber_free( ber, 0 );
return rc;
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。