winbindd: call add_trusted_domains_dc() in smbcontrol reload-config handler
authorRalph Boehme <slow@samba.org>
Thu, 18 Jan 2024 14:38:45 +0000 (15:38 +0100)
committerStefan Metzmacher <metze@samba.org>
Sat, 20 Jan 2024 13:20:37 +0000 (13:20 +0000)
This allows reloading trust info on an NT4 DC without restarting winbindd.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15533

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/winbindd/winbindd_dual.c

index ff78b844688092a5b3dfb4cf14dc1ae77dccf757..e63b4052fd81fcf86822f16990e99f0d67afc5ac 100644 (file)
@@ -948,6 +948,7 @@ void winbindd_msg_reload_services_parent(struct messaging_context *msg,
                .msg_type = msg_type,
                .data = data,
        };
+       bool ok;
 
        DBG_DEBUG("Got reload-config message\n");
 
@@ -963,6 +964,11 @@ void winbindd_msg_reload_services_parent(struct messaging_context *msg,
                tevent_thread_call_depth_set_callback(NULL, NULL);
        }
 
+       ok = add_trusted_domains_dc();
+       if (!ok) {
+               DBG_ERR("add_trusted_domains_dc() failed\n");
+       }
+
        forall_children(winbind_msg_relay_fn, &state);
 }