]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9959 Do not read c_auth without lock
authorOndřej Kuzník <ondra@mistotebe.net>
Mon, 3 Mar 2025 10:29:36 +0000 (10:29 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 18 Dec 2025 23:27:24 +0000 (23:27 +0000)
servers/lloadd/monitor.c

index 1047f80c6e480e5c90c4e4b5e1d1f2a9d458207f..d6c553e84591cfa9792d8599c32887dba2ef8d68 100644 (file)
@@ -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 );