s3:winbind: Set/unset the winbind_call_flow callback if log level changes
authorPavel Filipenský <pfilipensky@samba.org>
Wed, 3 May 2023 09:21:11 +0000 (11:21 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 19 Jul 2023 09:00:50 +0000 (09:00 +0000)
Done only for the parent process. Works with 'smbcontrol reload-config'

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jul 19 09:00:50 UTC 2023 on atb-devel-224

source3/winbindd/winbindd_dual.c

index e828e616765f8796dae2b75437db6c067e5cefa8..d3171ba542b4b389f8dd18eed126413dd9a27dc3 100644 (file)
@@ -953,6 +953,13 @@ void winbindd_msg_reload_services_parent(struct messaging_context *msg,
 
        winbindd_reload_services_file((const char *)private_data);
 
+       /* Set tevent_thread_call_depth_set_callback according to debug level */
+       if (lp_winbind_debug_traceid() && debuglevel_get() > 1) {
+               tevent_thread_call_depth_set_callback(winbind_call_flow, NULL);
+       } else {
+               tevent_thread_call_depth_set_callback(NULL, NULL);
+       }
+
        forall_children(winbind_msg_relay_fn, &state);
 }