From: Ralph Boehme Date: Sat, 14 Jun 2025 13:41:38 +0000 (+0200) Subject: smbd: move create_action handling to smbd_smb2_create_after_exec() X-Git-Tag: tdb-1.4.14~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c63d63e36ab83be9a2d4a4df41f59bf7ae1af06a;p=thirdparty%2Fsamba.git 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 --- 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;