1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-03 01:18:10 +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 6140c3177a)
This commit is contained in:
Ralph Boehme 2024-10-02 14:09:33 +02:00 committed by Jule Anger
parent 2c7f99a68c
commit 3572ffa6c5
2 changed files with 5 additions and 2 deletions
selftest/knownfail.d
source3/smbd

View File

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

View File

@ -3376,6 +3376,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,
@ -3402,7 +3403,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,
@ -3732,6 +3733,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;
@ -3760,6 +3762,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,
@ -4394,6 +4397,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,