smbd: Explicitly pass "file_id" to rename_share_filename
authorVolker Lendecke <vl@samba.org>
Thu, 20 Mar 2014 13:36:11 +0000 (14:36 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 21 Mar 2014 18:20:17 +0000 (19:20 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/locking/locking.c
source3/locking/proto.h
source3/smbd/reply.c

index 54c92b1470825da3922a496ed6f140f028c372c2..4ef6b8936a47d976fb43162f697dc99a5bdb5278 100644 (file)
@@ -468,6 +468,7 @@ struct share_mode_lock *get_existing_share_mode_lock(TALLOC_CTX *mem_ctx,
 
 bool rename_share_filename(struct messaging_context *msg_ctx,
                        struct share_mode_lock *lck,
+                       struct file_id id,
                        const char *servicepath,
                        uint32_t orig_name_hash,
                        uint32_t new_name_hash,
@@ -523,7 +524,7 @@ bool rename_share_filename(struct messaging_context *msg_ctx,
                return False;
        }
 
-       push_file_id_24(frm, &d->id);
+       push_file_id_24(frm, &id);
 
        DEBUG(10,("rename_share_filename: msg_len = %u\n", (unsigned int)msg_len ));
 
@@ -565,7 +566,7 @@ bool rename_share_filename(struct messaging_context *msg_ctx,
                          "pid %s file_id %s sharepath %s base_name %s "
                          "stream_name %s\n",
                          procid_str_static(&se->pid),
-                         file_id_string_tos(&d->id),
+                         file_id_string_tos(&id),
                          d->servicepath, d->base_name,
                        has_stream ? d->stream_name : ""));
 
index a897feacf3af31b88513fa718a10de458357294a..dc115e1d9695918684896b0ff5e2de8647edcbea 100644 (file)
@@ -164,6 +164,7 @@ struct share_mode_lock *fetch_share_mode_unlocked(TALLOC_CTX *mem_ctx,
                                                  struct file_id id);
 bool rename_share_filename(struct messaging_context *msg_ctx,
                        struct share_mode_lock *lck,
+                       struct file_id id,
                        const char *servicepath,
                        uint32_t orig_name_hash,
                        uint32_t new_name_hash,
index a66aa5a6dba2de4a42033a0325471a49a3be9b14..9603975761eff9d08c0bf8582d9d63bf45d768fe 100644 (file)
@@ -6141,7 +6141,7 @@ static void rename_open_files(connection_struct *conn,
        }
 
        /* Send messages to all smbd's (not ourself) that the name has changed. */
-       rename_share_filename(conn->sconn->msg_ctx, lck, conn->connectpath,
+       rename_share_filename(conn->sconn->msg_ctx, lck, id, conn->connectpath,
                              orig_name_hash, new_name_hash,
                              smb_fname_dst);