Skip to content
Snippets Groups Projects
Commit a1a68333 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

only add opattrs if not shadow; use helper to extract rdn

parent 1249fa93
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,8 @@ bdb_add(Operation *op, SlapReply *rs )
ctrls[num_ctrls] = 0;
slap_add_opattrs( op, &rs->sr_text, textbuf, textlen, 1 );
if ( !SLAP_SHADOW( op->o_bd ))
slap_add_opattrs( op, &rs->sr_text, textbuf, textlen, 1 );
/* check entry's schema */
rs->sr_err = entry_schema_check( op, op->oq_add.rs_e, NULL,
......@@ -386,12 +387,7 @@ retry: /* transaction retry */
struct berval nrdn;
Entry *e = entry_dup( op->ora_e );
if (pdn.bv_len) {
nrdn.bv_val = e->e_nname.bv_val;
nrdn.bv_len = pdn.bv_val - op->ora_e->e_nname.bv_val - 1;
} else {
nrdn = e->e_nname;
}
dnRdn( &e->e_nname, &nrdn );
bdb_cache_add( bdb, ei, e, &nrdn, locker );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment