From c63d63e36ab83be9a2d4a4df41f59bf7ae1af06a Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Sat, 14 Jun 2025 15:41:38 +0200 Subject: [PATCH] smbd: move create_action handling to smbd_smb2_create_after_exec() 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 Reviewed-by: Stefan Metzmacher --- source3/smbd/smb2_create.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index 5623a5a1bde..b36e188c474 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -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; -- 2.47.3