]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Avoid a dependency on share_mode_entry->id
authorVolker Lendecke <vl@samba.org>
Wed, 7 Feb 2018 10:40:58 +0000 (11:40 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 12 Feb 2018 23:26:43 +0000 (00:26 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/close.c

index c7ec3fdb6af95d0fb02435467b6485a7309653a7..3324d3ec4e03fd06ba404015eed9d6b4719af563 100644 (file)
@@ -1280,15 +1280,16 @@ void msg_close_file(struct messaging_context *msg_ctx,
                        DATA_BLOB *data)
 {
        files_struct *fsp = NULL;
+       struct file_id id;
        struct share_mode_entry e;
        struct smbd_server_connection *sconn =
                talloc_get_type_abort(private_data,
                struct smbd_server_connection);
 
-       message_to_share_mode_entry(&e.id, &e, (char *)data->data);
+       message_to_share_mode_entry(&id, &e, (char *)data->data);
 
        if(DEBUGLVL(10)) {
-               char *sm_str = share_mode_str(NULL, 0, &e.id, &e);
+               char *sm_str = share_mode_str(NULL, 0, &id, &e);
                if (!sm_str) {
                        smb_panic("talloc failed");
                }
@@ -1297,7 +1298,7 @@ void msg_close_file(struct messaging_context *msg_ctx,
                TALLOC_FREE(sm_str);
        }
 
-       fsp = file_find_dif(sconn, e.id, e.share_file_id);
+       fsp = file_find_dif(sconn, id, e.share_file_id);
        if (!fsp) {
                DEBUG(10,("msg_close_file: failed to find file.\n"));
                return;