1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-05 20:58:40 +03:00

smbd: fix share access check for overwrite dispostions

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15732

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Oct 14 12:23:04 UTC 2024 on atb-devel-224

(cherry picked from commit 6140c3177a0330f42411618c3fca28930ea02a21)
This commit is contained in:
Ralph Boehme 2024-10-02 14:09:33 +02:00 committed by Jule Anger
parent 66c09de1f3
commit 5c3e5377fe
2 changed files with 5 additions and 2 deletions

View File

@ -1 +0,0 @@
^samba3.smb2.acls.OVERWRITE_READ_ONLY_FILE

View File

@ -3389,6 +3389,7 @@ static NTSTATUS check_and_store_share_mode(
struct share_mode_lock *lck,
uint32_t create_disposition,
uint32_t access_mask,
uint32_t open_access_mask,
uint32_t share_access,
int oplock_request,
const struct smb2_lease *lease,
@ -3415,7 +3416,7 @@ static NTSTATUS check_and_store_share_mode(
status = handle_share_mode_lease(fsp,
lck,
create_disposition,
access_mask,
open_access_mask,
share_access,
oplock_request,
lease,
@ -3745,6 +3746,7 @@ struct open_ntcreate_lock_state {
struct smb_request *req;
uint32_t create_disposition;
uint32_t access_mask;
uint32_t open_access_mask;
uint32_t share_access;
int oplock_request;
const struct smb2_lease *lease;
@ -3773,6 +3775,7 @@ static void open_ntcreate_lock_add_entry(struct share_mode_lock *lck,
lck,
state->create_disposition,
state->access_mask,
state->open_access_mask,
state->share_access,
state->oplock_request,
state->lease,
@ -4407,6 +4410,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
.req = req,
.create_disposition = create_disposition,
.access_mask = access_mask,
.open_access_mask = open_access_mask,
.share_access = share_access,
.oplock_request = oplock_request,
.lease = lease,