summaryrefslogtreecommitdiffstats
path: root/source3/smbd/server.c
diff options
context:
space:
mode:
authorChristof Schmitt <cs@samba.org>2014-06-26 14:50:38 -0700
committerVolker Lendecke <vl@samba.org>2014-06-30 15:04:10 +0200
commitfa2d7d648cec04c4abaf25bcc4ccb0a81a9ca2b7 (patch)
tree863393c570adf96b0a22e8cf415cd83cac56e808 /source3/smbd/server.c
parentcee1531e551e5ccd5ccd4a55de226ad686919486 (diff)
downloadsamba-fa2d7d648cec04c4abaf25bcc4ccb0a81a9ca2b7.tar.gz
samba-fa2d7d648cec04c4abaf25bcc4ccb0a81a9ca2b7.tar.xz
samba-fa2d7d648cec04c4abaf25bcc4ccb0a81a9ca2b7.zip
smbd: Use common function for FORCE_DIS and KILL_CLIENT_IP in parent
The parent smbd process only forwards the message to the child processes. Use a common function instead of two separate ones that do the same thing. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r--source3/smbd/server.c33
1 files changed, 11 insertions, 22 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 40684adae1..0b54bc7064 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -216,6 +216,15 @@ NTSTATUS messaging_send_to_children(struct messaging_context *msg_ctx,
return NT_STATUS_OK;
}
+static void smb_parent_send_to_children(struct messaging_context *ctx,
+ void* data,
+ uint32_t msg_type,
+ struct server_id srv_id,
+ DATA_BLOB* msg_data)
+{
+ messaging_send_to_children(ctx, msg_type, msg_data);
+}
+
/*
* Parent smbd process sets its own debug level first and then
* sends a message to all the smbd children to adjust their debug
@@ -361,26 +370,6 @@ static void smbd_parent_notify_proxy_done(struct tevent_req *req)
DEBUG(1, ("notify proxy job ended with %s\n", strerror(ret)));
}
-static void smb_parent_force_tdis(struct messaging_context *ctx,
- void* data,
- uint32_t msg_type,
- struct server_id srv_id,
- DATA_BLOB* msg_data)
-{
- messaging_send_to_children(ctx, msg_type, msg_data);
-}
-
-static void smb_parent_kill_client_by_ip(struct messaging_context *ctx,
- void *data,
- uint32_t msg_type,
- struct server_id srv_id,
- DATA_BLOB* msg_data)
-{
- if (am_parent) {
- messaging_send_to_children(ctx, msg_type, msg_data);
- }
-}
-
static void add_child_pid(struct smbd_parent_context *parent,
pid_t pid)
{
@@ -910,9 +899,9 @@ static bool open_sockets_smbd(struct smbd_parent_context *parent,
messaging_register(msg_ctx, NULL, MSG_SMB_BRL_VALIDATE,
brl_revalidate);
messaging_register(msg_ctx, NULL, MSG_SMB_FORCE_TDIS,
- smb_parent_force_tdis);
+ smb_parent_send_to_children);
messaging_register(msg_ctx, NULL, MSG_SMB_KILL_CLIENT_IP,
- smb_parent_kill_client_by_ip);
+ smb_parent_send_to_children);
messaging_register(msg_ctx, NULL, MSG_SMB_TELL_NUM_CHILDREN,
smb_tell_num_children);