Commit ea29af5f authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

More changes from HEAD for 2.3.12

parent 08124f28
......@@ -3,7 +3,6 @@ OpenLDAP 2.3 Change Log
OpenLDAP 2.3.12 Release
Fixed libldap ldapi:// authdn construction
Added libldap ldap_bv2escaped_filter_value (ITS#2535)
Fixed libldap HSTRERROR issue (ITS#4124)
Added libldap/slapd TLS DSA certificate support (ITS#4017)
Fixed libldap SASL bind issue (ITS#4158)
Fixed ldapmodrdn empty line handling (ITS#4101)
......@@ -15,7 +14,6 @@ OpenLDAP 2.3.12 Release
Fixed slapd cn=config access modify issue (ITS#4127)
Fixed slapd cn=config init issue (ITS#4128)
Fixed slapd non-reentrant libwrap issue (ITS#4099)
Fixed slapd AIX IFMT issue (ITS#4123)
Fixed slapd thread v. tools_threads settings
Fixed slapd spurious defer message (ITS#3850)
Fixed slapd attribute SYNTAX OIDM issue (ITS#4116)
......@@ -43,7 +41,10 @@ OpenLDAP 2.3.12 Release
Fixed slurpd backwards compat issue (ITS#4151)
Added slurpd pid/arg file consistency check (ITS#4152)
Updated contrib smbk5pwd module
Removed lint
Build environment
Fixed libldap HSTRERROR issue (ITS#4124)
Fixed slapd AIX IFMT issue (ITS#4123)
Added slapd-bind test program
Added inet_ntoa_b support for VxWorks (ITS#3440)
Updated test036 (ITS#4095)
......
......@@ -290,7 +290,7 @@ bdb_modify( Operation *op, SlapReply *rs )
ctrls[num_ctrls] = NULL;
if ( !SLAP_SHADOW( op->o_bd ))
slap_mods_opattrs( op, op->orm_modlist, 1 );
slap_mods_opattrs( op, &op->orm_modlist, 1 );
if( 0 ) {
retry: /* transaction retry */
......
......@@ -242,7 +242,7 @@ ldbm_back_modify(
Debug(LDAP_DEBUG_ARGS, "ldbm_back_modify:\n", 0, 0, 0);
if ( !SLAP_SHADOW( op->o_bd ))
slap_mods_opattrs( op, op->orm_modlist, 1 );
slap_mods_opattrs( op, &op->orm_modlist, 1 );
/* grab giant lock for writing */
ldap_pvt_thread_rdwr_wlock(&li->li_giant_rwlock);
......
......@@ -70,7 +70,7 @@ monitor_back_modify( Operation *op, SlapReply *rs )
} else {
assert( !SLAP_SHADOW( op->o_bd ) );
slap_mods_opattrs( op, op->orm_modlist, 0 );
slap_mods_opattrs( op, &op->orm_modlist, 0 );
rc = monitor_entry_modify( op, rs, e );
}
......
......@@ -122,7 +122,7 @@ backsql_modify( Operation *op, SlapReply *rs )
goto done;
}
slap_mods_opattrs( op, op->orm_modlist, 1 );
slap_mods_opattrs( op, &op->orm_modlist, 1 );
oc = backsql_id2oc( bi, bsi.bsi_base_id.eid_oc_id );
assert( oc != NULL );
......
......@@ -169,14 +169,6 @@ do_modify(
}
*modtail = NULL;
if ( modlist == NULL ) {
Debug( LDAP_DEBUG_ANY, "do_modify: no modifications\n", 0, 0, 0 );
send_ldap_error( op, rs, LDAP_PROTOCOL_ERROR,
"change sequence empty" );
goto cleanup;
}
if( get_ctrls( op, rs, 1 ) != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_ANY, "do_modify: get_ctrls failed\n", 0, 0, 0 );
......@@ -819,7 +811,7 @@ void slap_timestamp( time_t *tm, struct berval *bv )
*/
void slap_mods_opattrs(
Operation *op,
Modifications *mods,
Modifications **modsp,
int manage_ctxcsn )
{
struct berval name, timestamp, csn = BER_BVNULL;
......@@ -861,9 +853,8 @@ void slap_mods_opattrs(
nname = op->o_ndn;
}
for ( mod = mods; mod->sml_next; mod = mod->sml_next )
for ( modtail = modsp; *modtail; modtail = &(*modtail)->sml_next )
;
modtail = &mod->sml_next;
mod = (Modifications *) ch_malloc( sizeof( Modifications ) );
mod->sml_op = LDAP_MOD_REPLACE;
......@@ -881,7 +872,7 @@ void slap_mods_opattrs(
modtail = &mod->sml_next;
if ( get_manageDIT( op ) ) {
for ( mod = mods; mod != modlast; mod = mod->sml_next ) {
for ( mod = *modsp; mod != modlast; mod = mod->sml_next ) {
if ( mod->sml_desc == slap_schema.si_ad_modifiersName ) {
break;
}
......@@ -909,7 +900,7 @@ void slap_mods_opattrs(
}
if ( get_manageDIT( op ) ) {
for ( mod = mods; mod != modlast; mod = mod->sml_next ) {
for ( mod = *modsp; mod != modlast; mod = mod->sml_next ) {
if ( mod->sml_desc == slap_schema.si_ad_modifyTimestamp ) {
break;
}
......
......@@ -201,6 +201,15 @@ static int translucent_delete(Operation *op, SlapReply *rs) {
return(SLAP_CB_CONTINUE);
}
static int
translucent_tag_cb( Operation *op, SlapReply *rs )
{
op->o_tag = (ber_tag_t)op->o_callback->sc_private;
rs->sr_tag = slap_req2res( op->o_tag );
return SLAP_CB_CONTINUE;
}
/*
** translucent_modify()
** modify in local backend if exists in both;
......@@ -220,6 +229,7 @@ static int translucent_modify(Operation *op, SlapReply *rs) {
Attribute *a, *ax;
Modifications *m, *mm;
int del, rc, erc = 0;
slap_callback cb = { 0 }, *save_cb;
Debug(LDAP_DEBUG_TRACE, "==> translucent_modify: %s\n",
op->o_req_dn.bv_val, 0, 0);
......@@ -376,7 +386,13 @@ release:
op->o_bd->bd_info = (BackendInfo *) on;
glue_parent(&nop);
save_cb = op->o_callback;
cb.sc_response = translucent_tag_cb;
cb.sc_private = (void *)LDAP_REQ_MODIFY;
cb.sc_next = nop.o_callback;
nop.o_callback = &cb;
rc = on->on_info->oi_orig->bi_op_add(&nop, &nrs);
nop.o_callback = save_cb;
free_attr_chain(a);
return(rc);
......
......@@ -1057,7 +1057,7 @@ LDAP_SLAPD_F( void ) slap_timestamp(
LDAP_SLAPD_F( void ) slap_mods_opattrs(
Operation *op,
Modifications *mods,
Modifications **modsp,
int manage_ctxcsn );
/*
......@@ -1341,6 +1341,7 @@ LDAP_SLAPD_F (int) str2result LDAP_P(( char *s,
int *code, char **matched, char **info ));
LDAP_SLAPD_F (int) slap_map_api2result LDAP_P(( SlapReply *rs ));
LDAP_SLAPD_F (slap_mask_t) slap_attr_flags LDAP_P(( AttributeName *an ));
LDAP_SLAPD_F (ber_tag_t) slap_req2res LDAP_P(( ber_tag_t tag ));
LDAP_SLAPD_V( const struct berval ) slap_dummy_bv;
......
......@@ -115,7 +115,8 @@ static char *v2ref( BerVarray ref, const char *text )
return v2;
}
static ber_tag_t req2res( ber_tag_t tag )
ber_tag_t
slap_req2res( ber_tag_t tag )
{
switch( tag ) {
case LDAP_REQ_ADD:
......@@ -503,7 +504,7 @@ send_ldap_disconnect( Operation *op, SlapReply *rs )
if ( op->o_protocol < LDAP_VERSION3 ) {
rs->sr_rspoid = NULL;
rs->sr_tag = req2res( op->o_tag );
rs->sr_tag = slap_req2res( op->o_tag );
rs->sr_msgid = (rs->sr_tag != LBER_SEQUENCE) ? op->o_msgid : 0;
} else {
......@@ -573,7 +574,7 @@ slap_send_ldap_result( Operation *op, SlapReply *rs )
rs->sr_ref = NULL;
}
rs->sr_tag = req2res( op->o_tag );
rs->sr_tag = slap_req2res( op->o_tag );
rs->sr_msgid = (rs->sr_tag != LBER_SEQUENCE) ? op->o_msgid : 0;
abandon:
......@@ -608,7 +609,7 @@ send_ldap_sasl( Operation *op, SlapReply *rs )
rs->sr_err,
rs->sr_sasldata ? (long) rs->sr_sasldata->bv_len : -1, NULL );
rs->sr_tag = req2res( op->o_tag );
rs->sr_tag = slap_req2res( op->o_tag );
rs->sr_msgid = (rs->sr_tag != LBER_SEQUENCE) ? op->o_msgid : 0;
if ( send_ldap_response( op, rs ) == SLAP_CB_CONTINUE ) {
......@@ -630,7 +631,7 @@ slap_send_ldap_extended( Operation *op, SlapReply *rs )
rs->sr_rspoid ? rs->sr_rspoid : "",
rs->sr_rspdata != NULL ? rs->sr_rspdata->bv_len : 0 );
rs->sr_tag = req2res( op->o_tag );
rs->sr_tag = slap_req2res( op->o_tag );
rs->sr_msgid = (rs->sr_tag != LBER_SEQUENCE) ? op->o_msgid : 0;
if ( send_ldap_response( op, rs ) == SLAP_CB_CONTINUE ) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment