]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/connection.c
also log cookie parsing
[openldap] / servers / slapd / connection.c
index 8c86a026221a6e41a6180c1ab18598a2296d78fc..9ec67f503a6d049ee48eec22e6e75089100234c6 100644 (file)
@@ -1038,12 +1038,12 @@ void connection_done( Connection *c )
 static BI_op_func *opfun[] = {
        do_bind,
        do_unbind,
+       do_search,
+       do_compare,
+       do_modify,
+       do_modrdn,
        do_add,
        do_delete,
-       do_modrdn,
-       do_modify,
-       do_compare,
-       do_search,
        do_abandon,
        do_extended,
        NULL
@@ -1200,7 +1200,6 @@ int connection_client_setup(
        ldap_pvt_thread_start_t *func,
        void *arg )
 {
-       int rc;
        Connection *c;
 
        c = connection_init( s, (Listener *)&dummy_list, "", "",
@@ -1816,13 +1815,14 @@ static int connection_bind_cb( Operation *op, SlapReply *rs )
 
                        /* log authorization identity */
                        Statslog( LDAP_DEBUG_STATS,
-                               "%s BIND dn=\"%s\" mech=%s ssf=%d\n",
+                               "%s BIND dn=\"%s\" mech=%s sasl_ssf=%d ssf=%d\n",
                                op->o_log_prefix,
                                BER_BVISNULL( &op->o_conn->c_dn ) ? "<empty>" : op->o_conn->c_dn.bv_val,
-                               op->o_conn->c_authmech.bv_val, op->orb_ssf, 0 );
+                               op->o_conn->c_authmech.bv_val,
+                               op->orb_ssf, op->o_conn->c_ssf );
 
                        Debug( LDAP_DEBUG_TRACE,
-                               "do_bind: SASL/%s bind: dn=\"%s\" ssf=%d\n",
+                               "do_bind: SASL/%s bind: dn=\"%s\" sasl_ssf=%d\n",
                                op->o_conn->c_authmech.bv_val,
                                BER_BVISNULL( &op->o_conn->c_dn ) ? "<empty>" : op->o_conn->c_dn.bv_val,
                                op->orb_ssf );
@@ -1994,19 +1994,21 @@ connection_fake_destroy(
 void
 connection_fake_init(
        Connection *conn,
-       Operation *op,
+       OperationBuffer *opbuf,
        void *ctx )
 {
-       connection_fake_init2( conn, op, ctx, 1 );
+       connection_fake_init2( conn, opbuf, ctx, 1 );
 }
 
 void
 connection_fake_init2(
        Connection *conn,
-       Operation *op,
+       OperationBuffer *opbuf,
        void *ctx,
        int newmem )
 {
+       Operation *op = (Operation *) opbuf;
+
        conn->c_connid = -1;
        conn->c_send_ldap_result = slap_send_ldap_result;
        conn->c_send_search_entry = slap_send_search_entry;
@@ -2015,9 +2017,10 @@ connection_fake_init2(
        conn->c_peer_domain = slap_empty_bv;
        conn->c_peer_name = slap_empty_bv;
 
-       memset(op, 0, OPERATION_BUFFER_SIZE);
-       op->o_hdr = (Opheader *)(op+1);
-       op->o_controls = (void **)(op->o_hdr+1);
+       memset( opbuf, 0, sizeof( *opbuf ));
+       op->o_hdr = &opbuf->ob_hdr;
+       op->o_controls = opbuf->ob_controls;
+
        /* set memory context */
        op->o_tmpmemctx = slap_sl_mem_create(SLAP_SLAB_SIZE, SLAP_SLAB_STACK, ctx,
                newmem );
@@ -2031,10 +2034,11 @@ connection_fake_init2(
 
 #ifdef LDAP_SLAPI
        if ( slapi_plugins_used ) {
-               conn_fake_extblock *eb = NULL;
+               conn_fake_extblock *eb;
+               void *ebx = NULL;
 
                /* Use thread keys to make sure these eventually get cleaned up */
-               if ( ldap_pvt_thread_pool_getkey( ctx, connection_fake_init, &eb,
+               if ( ldap_pvt_thread_pool_getkey( ctx, connection_fake_init, &ebx,
                        NULL )) {
                        eb = ch_malloc( sizeof( *eb ));
                        slapi_int_create_object_extensions( SLAPI_X_EXT_CONNECTION, conn );
@@ -2044,6 +2048,7 @@ connection_fake_init2(
                        ldap_pvt_thread_pool_setkey( ctx, connection_fake_init, eb,
                                connection_fake_destroy );
                } else {
+                       eb = ebx;
                        conn->c_extensions = eb->eb_conn;
                        op->o_hdr->oh_extensions = eb->eb_op;
                }