]> git.ipfire.org Git - thirdparty/samba.git/commit
smbd: simplify create_action handling
authorRalph Boehme <slow@samba.org>
Tue, 8 Jul 2025 12:47:24 +0000 (14:47 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 5 Aug 2025 14:52:34 +0000 (14:52 +0000)
commit93c1f55917ee0500b3c9fc169063cb3a5a492983
tree117cdd41d045a9aee73f3fc8dd82655e90d6b132
parent45aa16a77a55600cf972dcc11f2f003cd991ed73
smbd: simplify create_action handling

(state->info == FILE_WAS_OVERWRITTEN) can only happen when returning
SMB_VFS_CREATE_FILE(), not for a Durable Handle reconnect or Replay, hence we
can move the check and adjustment of state->info to smbd_smb2_create_send()
after the call to SMB_VFS_CREATE_FILE().

This nicely simplifies the logic in smbd_smb2_create_finish() where we can now
just set state->op->create_action and state->out_create_action to the value of
state->info.

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