mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-12 10:54:48 +08:00
ITS#4777 fix modlist delete
This commit is contained in:
parent
2761b06c58
commit
499c9369e1
@ -302,7 +302,7 @@ static int translucent_modify(Operation *op, SlapReply *rs) {
|
|||||||
translucent_info *ov = on->on_bi.bi_private;
|
translucent_info *ov = on->on_bi.bi_private;
|
||||||
Entry *e = NULL, *re = NULL;
|
Entry *e = NULL, *re = NULL;
|
||||||
Attribute *a, *ax;
|
Attribute *a, *ax;
|
||||||
Modifications *m, *mm;
|
Modifications *m, **mm;
|
||||||
int del, rc, erc = 0;
|
int del, rc, erc = 0;
|
||||||
slap_callback cb = { 0 };
|
slap_callback cb = { 0 };
|
||||||
|
|
||||||
@ -343,7 +343,9 @@ static int translucent_modify(Operation *op, SlapReply *rs) {
|
|||||||
|
|
||||||
if(e && rc == LDAP_SUCCESS) {
|
if(e && rc == LDAP_SUCCESS) {
|
||||||
Debug(LDAP_DEBUG_TRACE, "=> translucent_modify: found local entry\n", 0, 0, 0);
|
Debug(LDAP_DEBUG_TRACE, "=> translucent_modify: found local entry\n", 0, 0, 0);
|
||||||
for(m = op->orm_modlist; m; m = m->sml_next) {
|
for(mm = &op->orm_modlist; *mm; ) {
|
||||||
|
m = *mm;
|
||||||
|
mm = &m->sml_next;
|
||||||
for(a = e->e_attrs; a; a = a->a_next)
|
for(a = e->e_attrs; a; a = a->a_next)
|
||||||
if(a->a_desc == m->sml_desc) break;
|
if(a->a_desc == m->sml_desc) break;
|
||||||
if(a) continue; /* found local attr */
|
if(a) continue; /* found local attr */
|
||||||
@ -362,11 +364,9 @@ static int translucent_modify(Operation *op, SlapReply *rs) {
|
|||||||
Debug(LDAP_DEBUG_TRACE,
|
Debug(LDAP_DEBUG_TRACE,
|
||||||
"=> translucent_modify: silently dropping delete: %s\n",
|
"=> translucent_modify: silently dropping delete: %s\n",
|
||||||
m->sml_desc->ad_cname.bv_val, 0, 0);
|
m->sml_desc->ad_cname.bv_val, 0, 0);
|
||||||
for(mm = op->orm_modlist; mm->sml_next != m; mm = mm->sml_next);
|
*mm = m->sml_next;
|
||||||
mm->sml_next = m->sml_next;
|
|
||||||
m->sml_next = NULL;
|
m->sml_next = NULL;
|
||||||
slap_mods_free(m, 1);
|
slap_mods_free(m, 1);
|
||||||
m = mm;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
m->sml_op = LDAP_MOD_ADD;
|
m->sml_op = LDAP_MOD_ADD;
|
||||||
|
Loading…
Reference in New Issue
Block a user