X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Foverlays%2Faccesslog.c;h=bd61096dbbb9f8e01c5e267438b588eca0bc0c43;hb=d2d1eb786b1051047ab2c77110ddc31778359c26;hp=e802492e8f2c8204a0383fbfb3e4c44f68d09f9f;hpb=abc13afcc9991c33ff2d4f7627d838fe847a0670;p=openldap diff --git a/servers/slapd/overlays/accesslog.c b/servers/slapd/overlays/accesslog.c index e802492e8f..bd61096dbb 100644 --- a/servers/slapd/overlays/accesslog.c +++ b/servers/slapd/overlays/accesslog.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 2005 The OpenLDAP Foundation. + * Copyright 2005-2006 The OpenLDAP Foundation. * Portions copyright 2004-2005 Symas Corporation. * All rights reserved. * @@ -1112,7 +1112,7 @@ accesslog_unbind( Operation *op, SlapReply *rs ) slap_overinst *on = (slap_overinst *)op->o_bd->bd_info; if ( op->o_conn->c_authz_backend == on->on_info->oi_origdb ) { log_info *li = on->on_bi.bi_private; - Operation op2; + Operation op2 = {0}; void *cids[SLAP_MAX_CIDS]; SlapReply rs2 = {REP_RESULT}; Entry *e; @@ -1132,7 +1132,6 @@ accesslog_unbind( Operation *op, SlapReply *rs ) op2.o_callback = &nullsc; op2.o_controls = cids; memset(cids, 0, sizeof( cids )); - memset(op2.o_ctrlflag, 0, sizeof( op2.o_ctrlflag )); op2.o_bd->be_add( &op2, &rs2 ); entry_free( e ); @@ -1145,7 +1144,7 @@ accesslog_abandon( Operation *op, SlapReply *rs ) { slap_overinst *on = (slap_overinst *)op->o_bd->bd_info; log_info *li = on->on_bi.bi_private; - Operation op2; + Operation op2 = {0}; void *cids[SLAP_MAX_CIDS]; SlapReply rs2 = {REP_RESULT}; Entry *e; @@ -1171,7 +1170,6 @@ accesslog_abandon( Operation *op, SlapReply *rs ) op2.o_callback = &nullsc; op2.o_controls = cids; memset(cids, 0, sizeof( cids )); - memset(op2.o_ctrlflag, 0, sizeof( op2.o_ctrlflag )); op2.o_bd->be_add( &op2, &rs2 ); entry_free( e ); @@ -1280,8 +1278,10 @@ accesslog_db_open( Attribute *a; a = attr_find( e_ctx->e_attrs, slap_schema.si_ad_contextCSN ); - if ( a ) + if ( a ) { + attr_merge( e, slap_schema.si_ad_entryCSN, a->a_vals, NULL ); attr_merge( e, a->a_desc, a->a_vals, NULL ); + } be_entry_release_rw( op, e_ctx, 0 ); } op->o_bd->bd_info = (BackendInfo *)on;