summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2021-01-20 12:00:16 +0100
committerKarolin Seeger <kseeger@samba.org>2021-01-27 16:00:06 +0000
commit115c987aa58a2cdd5430dc0809c1a8ee94e3261e (patch)
treeafff5691a3282eff5639fea2fe55bcd092d5cdc0 /source3
parent4df20674da1942425cb64fac25bf876b2778d164 (diff)
downloadsamba-115c987aa58a2cdd5430dc0809c1a8ee94e3261e.tar.gz
winbind: handle MSG_SMB_CONF_UPDATED in the winbinds children
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14602 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 072ef48001710ed8326c83295f2d3cc301d27cfe)
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd_dual.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c
index 2885dd4d005..c13bf6e8b2f 100644
--- a/source3/winbindd/winbindd_dual.c
+++ b/source3/winbindd/winbindd_dual.c
@@ -929,6 +929,16 @@ void winbind_disconnect_dc_parent(struct messaging_context *msg_ctx,
forall_children(winbind_msg_relay_fn, &state);
}
+static void winbindd_msg_reload_services_child(struct messaging_context *msg,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB *data)
+{
+ DBG_DEBUG("Got reload-config message\n");
+ winbindd_reload_services_file((const char *)private_data);
+}
+
/* React on 'smbcontrol winbindd reload-config' in the same way as on SIGHUP*/
void winbindd_msg_reload_services_parent(struct messaging_context *msg,
void *private_data,
@@ -936,12 +946,20 @@ void winbindd_msg_reload_services_parent(struct messaging_context *msg,
struct server_id server_id,
DATA_BLOB *data)
{
+ struct winbind_msg_relay_state state = {
+ .msg_ctx = msg,
+ .msg_type = msg_type,
+ .data = data,
+ };
+
DBG_DEBUG("Got reload-config message\n");
/* Flush various caches */
winbindd_flush_caches();
winbindd_reload_services_file((const char *)private_data);
+
+ forall_children(winbind_msg_relay_fn, &state);
}
/* Set our domains as offline and forward the offline message to our children. */
@@ -1784,6 +1802,10 @@ static bool fork_domain_child(struct winbindd_child *child)
messaging_register(global_messaging_context(), NULL,
MSG_WINBIND_DISCONNECT_DC,
winbind_msg_disconnect_dc);
+ messaging_register(global_messaging_context(),
+ override_logfile ? NULL : child->logfilename,
+ MSG_SMB_CONF_UPDATED,
+ winbindd_msg_reload_services_child);
primary_domain = find_our_domain();