]> git.sur5r.net Git - openldap/commitdiff
More changes from HEAD for 2.3.12
authorKurt Zeilenga <kurt@openldap.org>
Fri, 18 Nov 2005 00:09:24 +0000 (00:09 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 18 Nov 2005 00:09:24 +0000 (00:09 +0000)
CHANGES
servers/slapd/back-bdb/modify.c
servers/slapd/back-ldbm/modify.c
servers/slapd/back-monitor/modify.c
servers/slapd/back-sql/modify.c
servers/slapd/modify.c
servers/slapd/overlays/translucent.c
servers/slapd/proto-slap.h
servers/slapd/result.c

diff --git a/CHANGES b/CHANGES
index ae3e453f59c56c32e967758ce31420691b3c16ea..73435c6da75dd70c3ff3dc07f142e398db9deb8b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -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)
index 122784bd16871e712bbfae93c72c48a7397575d1..a1aeb801fc30adf5117026fd3789562879af2f2a 100644 (file)
@@ -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 */
index 1df17bd4f78bc72a4debe856fe395262c6577124..246ee28e262c333f296294464e3a0494c9fca96d 100644 (file)
@@ -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);
index 728975360cf8de4e0f67bf04ba0601d8315b8f79..04239bbf53bdd880004866916224b37e1729416e 100644 (file)
@@ -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 );
        }
index 2977b3c8d60fff42c245118ae44ca6f71b2b6473..2f836d4b4c00e3aee1e5443e2a5f0e63a1536d13 100644 (file)
@@ -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 );
index 1fae806ddf02986626d5414c7ac5a9e6822caa82..e97c847ac5092dd3a6e2fdab4ee998a74e3d1ac4 100644 (file)
@@ -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;
                                }
index 49f1ff0e672fa572e9ed00749266b94bf96851f3..13e37ff9be714ff3a53e75b3f07bb5181f5640ad 100644 (file)
@@ -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);
index e8259a095959d80730b8340bbc43468e448637a5..14a7b8ea7761fda1b5304e8c6ba12de7d7322584 100644 (file)
@@ -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;
 
index a0feb62b87ca022bcf19cde26920acc67d5c9e25..52a67ea2f8cd9e59aeb7bc3beeeea10198b59fc5 100644 (file)
@@ -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 ) {