s3:smbd: register MSG_SMB_FILE_RENAME after the fork
authorStefan Metzmacher <metze@samba.org>
Tue, 13 Dec 2011 07:19:06 +0000 (08:19 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 13 Dec 2011 11:36:35 +0000 (12:36 +0100)
The parent smbd doesn't need to handle this, as it doesn't
have any file handles open.

metze

source3/smbd/process.c
source3/smbd/server.c

index cb04cea3e2f6d5c4087956992b0f5123b82843b9..51783fa67c7926eb6133fd330221d84a69913fcb 100644 (file)
@@ -3139,6 +3139,8 @@ void smbd_process(struct tevent_context *ev_ctx,
                           MSG_SMB_FORCE_TDIS, msg_force_tdis);
        messaging_register(sconn->msg_ctx, sconn,
                           MSG_SMB_CLOSE_FILE, msg_close_file);
+       messaging_register(sconn->msg_ctx, NULL,
+                          MSG_SMB_FILE_RENAME, msg_file_was_renamed);
 
        /*
         * Use the default MSG_DEBUG handler to avoid rebroadcasting
index cc51979c34c3d86906c291a1a055a52802c6ca8d..9ce956db10e2345d35e6c9cfafaa3ade0b7fca88 100644 (file)
@@ -749,8 +749,6 @@ static bool open_sockets_smbd(struct smbd_parent_context *parent,
 
        messaging_register(msg_ctx, NULL, MSG_SMB_SAM_SYNC, msg_sam_sync);
        messaging_register(msg_ctx, NULL, MSG_SHUTDOWN, msg_exit_server);
-       messaging_register(msg_ctx, NULL, MSG_SMB_FILE_RENAME,
-                          msg_file_was_renamed);
        messaging_register(msg_ctx, ev_ctx, MSG_SMB_CONF_UPDATED,
                           smb_conf_updated);
        messaging_register(msg_ctx, NULL, MSG_SMB_STAT_CACHE_DELETE,