From: Ondřej Kuzník Date: Mon, 3 Mar 2025 10:29:36 +0000 (+0000) Subject: ITS#9959 Do not read c_auth without lock X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcbb48dec7ac363409e369502b29f4d15fa92c41;p=thirdparty%2Fopenldap.git ITS#9959 Do not read c_auth without lock --- diff --git a/servers/lloadd/monitor.c b/servers/lloadd/monitor.c index 1047f80c6e..d6c553e845 100644 --- a/servers/lloadd/monitor.c +++ b/servers/lloadd/monitor.c @@ -705,6 +705,12 @@ lload_monitor_conn_update( Operation *op, SlapReply *rs, Entry *e, void *priv ) } break; } + attr_delete( &e->e_attrs, ad_olmConnectionAuthzDN ); + if ( !BER_BVISNULL( &c->c_auth ) ) { + attr_merge_normalize_one( e, ad_olmConnectionAuthzDN, + &c->c_auth, op->o_tmpmemctx ); + } + CONNECTION_UNLOCK(c); a = attr_find( e->e_attrs, ad_olmConnectionType ); @@ -723,12 +729,6 @@ lload_monitor_conn_update( Operation *op, SlapReply *rs, Entry *e, void *priv ) } a->a_vals[0] = bv_state; - attr_delete( &e->e_attrs, ad_olmConnectionAuthzDN ); - if ( !BER_BVISNULL( &c->c_auth ) ) { - attr_merge_normalize_one( e, ad_olmConnectionAuthzDN, - &c->c_auth, op->o_tmpmemctx ); - } - a = attr_find( e->e_attrs, ad_olmPendingOps ); assert( a != NULL ); UI2BV( &a->a_vals[0], pending );