diff options
Diffstat (limited to 'source3/nsswitch/winbindd.c')
-rw-r--r-- | source3/nsswitch/winbindd.c | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c index f4405981d2..e73fe79b1e 100644 --- a/source3/nsswitch/winbindd.c +++ b/source3/nsswitch/winbindd.c @@ -182,8 +182,11 @@ static void sigchld_handler(int signum) } /* React on 'smbcontrol winbindd reload-config' in the same way as on SIGHUP*/ -static void msg_reload_services(int msg_type, struct server_id src, - void *buf, size_t len, void *private_data) +static void msg_reload_services(struct messaging_context *msg, + void *private_data, + uint32_t msg_type, + struct server_id server_id, + DATA_BLOB *data) { /* Flush various caches */ flush_caches(); @@ -191,8 +194,11 @@ static void msg_reload_services(int msg_type, struct server_id src, } /* React on 'smbcontrol winbindd shutdown' in the same way as on SIGTERM*/ -static void msg_shutdown(int msg_type, struct server_id src, - void *buf, size_t len, void *private_data) +static void msg_shutdown(struct messaging_context *msg, + void *private_data, + uint32_t msg_type, + struct server_id server_id, + DATA_BLOB *data) { do_sigterm = True; } @@ -883,7 +889,9 @@ static int process_loop(int listen_sock, int listen_priv_sock) DEBUG(3, ("got SIGHUP\n")); - msg_reload_services(MSG_SMB_CONF_UPDATED, pid_to_procid(0), NULL, 0, NULL); + flush_caches(); + reload_services_file(); + do_sighup = False; } @@ -1137,14 +1145,18 @@ int main(int argc, char **argv, char **envp) /* React on 'smbcontrol winbindd reload-config' in the same way as to SIGHUP signal */ - message_register(MSG_SMB_CONF_UPDATED, msg_reload_services, NULL); - message_register(MSG_SHUTDOWN, msg_shutdown, NULL); + messaging_register(winbind_messaging_context(), NULL, + MSG_SMB_CONF_UPDATED, msg_reload_services); + messaging_register(winbind_messaging_context(), NULL, + MSG_SHUTDOWN, msg_shutdown); /* Handle online/offline messages. */ - message_register(MSG_WINBIND_OFFLINE, winbind_msg_offline, NULL); - message_register(MSG_WINBIND_ONLINE, winbind_msg_online, NULL); - message_register(MSG_WINBIND_ONLINESTATUS, winbind_msg_onlinestatus, - NULL); + messaging_register(winbind_messaging_context(), NULL, + MSG_WINBIND_OFFLINE, winbind_msg_offline); + messaging_register(winbind_messaging_context(), NULL, + MSG_WINBIND_ONLINE, winbind_msg_online); + messaging_register(winbind_messaging_context(), NULL, + MSG_WINBIND_ONLINESTATUS, winbind_msg_onlinestatus); poptFreeContext(pc); |