]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: move create_action handling to smbd_smb2_create_after_exec()
authorRalph Boehme <slow@samba.org>
Sat, 14 Jun 2025 13:41:38 +0000 (15:41 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 5 Aug 2025 14:52:34 +0000 (14:52 +0000)
This ensures op->create_action is set when we're calling smbXsrv_open_update()
and fixes create_action handling for create replays.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/smb2_create.c

index 5623a5a1bdeb445326ac4e5443b315abda807749..b36e188c47465cf364250677b178b11afaec7a59 100644 (file)
@@ -1680,6 +1680,9 @@ static void smbd_smb2_create_after_exec(struct tevent_req *req)
 
        DBG_DEBUG("response construction phase\n");
 
+       state->op->create_action = state->info;
+       state->out_create_action = state->info;
+
        state->out_file_attributes = fdos_mode(state->result);
 
        if ((state->out_file_attributes & FILE_ATTRIBUTE_REPARSE_POINT) &&
@@ -1961,9 +1964,6 @@ static void smbd_smb2_create_finish(struct tevent_req *req)
                state->out_oplock_level = map_samba_oplock_levels_to_smb2(result->oplock_type);
        }
 
-       state->op->create_action = state->info;
-       state->out_create_action = state->info;
-
        state->out_creation_ts = get_create_timespec(smb1req->conn,
                                        result, result->fsp_name);
        state->out_last_access_ts = result->fsp_name->st.st_ex_atime;