]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slapi/slapi_ops.c
Misc changes from HEAD
[openldap] / servers / slapd / slapi / slapi_ops.c
index b5f1c48b5dbde1eee47c80599cd3a34ade0a11af..aba0caeb44460bb6c4f1e9dd3458a1eb4f0ad1a8 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2002-2005 The OpenLDAP Foundation.
+ * Copyright 2002-2006 The OpenLDAP Foundation.
  * Portions Copyright 1997,2002-2003 IBM Corporation.
  * All rights reserved.
  *
@@ -253,7 +253,7 @@ slapi_int_connection_init_pb( Slapi_PBlock *pb, ber_tag_t tag )
        conn->c_conn_state  = 0x01;     /* SLAP_C_ACTIVE */
        conn->c_struct_state = 0x02;    /* SLAP_C_USED */
 
-       conn->c_ssf = conn->c_transport_ssf = 0;
+       conn->c_ssf = conn->c_transport_ssf = local_ssf;
        conn->c_tls_ssf = 0;
 
        backend_connection_init( conn );
@@ -342,9 +342,10 @@ slapi_int_connection_done_pb( Slapi_PBlock *pb )
                        op->o_tmpfree( op->orr_nnewSup->bv_val, op->o_tmpmemctx );
                        op->o_tmpfree( op->orr_nnewSup, op->o_tmpmemctx );
                }
+               slap_mods_free( op->orr_modlist, 1 );
                break;
        case LDAP_REQ_ADD:
-               slap_mods_free( op->ora_modlist, 1 );
+               slap_mods_free( op->ora_modlist, 0 );
                break;
        case LDAP_REQ_MODIFY:
                slap_mods_free( op->orm_modlist, 1 );
@@ -362,6 +363,8 @@ slapi_int_connection_done_pb( Slapi_PBlock *pb )
        slapi_ch_free_string( &conn->c_authmech.bv_val );
        slapi_ch_free_string( &conn->c_dn.bv_val );
        slapi_ch_free_string( &conn->c_ndn.bv_val );
+       slapi_ch_free_string( &conn->c_peer_domain.bv_val );
+       slapi_ch_free_string( &conn->c_peer_name.bv_val );
 
        if ( conn->c_sb != NULL ) {
                ber_sockbuf_free( conn->c_sb );
@@ -407,7 +410,6 @@ slapi_delete_internal_pb( Slapi_PBlock *pb )
        PBLOCK_ASSERT_INTOP( pb, LDAP_REQ_DELETE );
 
        slapi_int_func_internal_pb( pb, op_delete );
-       slap_graduate_commit_csn( pb->pb_op );
 
        return 0;
 }
@@ -471,7 +473,7 @@ slapi_add_internal_pb( Slapi_PBlock *pb )
 
        /* Duplicate the values, because we may call slapi_entry_free() */
        rs->sr_err = slap_mods2entry( pb->pb_op->ora_modlist, &pb->pb_op->ora_e,
-               1, 1, &rs->sr_text, pb->pb_textbuf, sizeof( pb->pb_textbuf ) );
+               1, 0, &rs->sr_text, pb->pb_textbuf, sizeof( pb->pb_textbuf ) );
        if ( rs->sr_err != LDAP_SUCCESS ) {
                goto cleanup;
        }
@@ -490,7 +492,6 @@ slapi_add_internal_pb( Slapi_PBlock *pb )
        }
 
 cleanup:
-       slap_graduate_commit_csn( pb->pb_op );
 
        if ( pb->pb_op->ora_e != NULL ) {
                slapi_entry_free( pb->pb_op->ora_e );
@@ -522,7 +523,6 @@ slapi_modrdn_internal_pb( Slapi_PBlock *pb )
        slapi_int_func_internal_pb( pb, op_modrdn );
 
 cleanup:
-       slap_graduate_commit_csn( pb->pb_op );
 
        return 0;
 }
@@ -559,7 +559,6 @@ slapi_modify_internal_pb( Slapi_PBlock *pb )
        slapi_int_func_internal_pb( pb, op_modify );
 
 cleanup:
-       slap_graduate_commit_csn( pb->pb_op );
 
        return 0;
 }
@@ -865,6 +864,7 @@ slapi_rename_internal_set_pb( Slapi_PBlock *pb,
        slapi_pblock_set( pb, SLAPI_TARGET_UNIQUEID,    (void *)uniqueid );
        slapi_pblock_set( pb, SLAPI_PLUGIN_IDENTITY,    (void *)plugin_identity );
        slapi_pblock_set( pb, SLAPI_X_INTOP_FLAGS,      (void *)&operation_flags );
+       slap_modrdn2mods( pb->pb_op, pb->pb_rs );
        slapi_int_set_operation_dn( pb );
 }