1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

smbd: replace calls to check_access() with smbd_check_access_rights()

check_access() is a 1:1 wrapper arounf smbd_check_access_rights().

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Ralph Boehme 2020-10-27 12:23:00 +01:00 committed by Jeremy Allison
parent ed88f59189
commit 7f0008a992

View File

@ -191,23 +191,6 @@ done:
}
#endif
/********************************************************************
The canonical "check access" based on path.
********************************************************************/
static NTSTATUS check_access(connection_struct *conn,
struct files_struct *dirfsp,
const struct smb_filename *smb_fname,
uint32_t access_mask)
{
SMB_ASSERT(dirfsp == dirfsp->conn->cwd_fsp);
return smbd_check_access_rights(conn,
dirfsp,
smb_fname,
false,
access_mask);
}
/********************************************************************
Roundup a value to the nearest allocation roundup size boundary.
Only do this for Windows clients.
@ -819,9 +802,10 @@ NTSTATUS set_ea(connection_struct *conn, files_struct *fsp,
if (fsp != NULL) {
status = check_access_fsp(fsp, FILE_WRITE_EA);
} else {
status = check_access(conn,
status = smbd_check_access_rights(conn,
conn->cwd_fsp,
smb_fname,
false,
FILE_WRITE_EA);
}
if (!NT_STATUS_IS_OK(status)) {
@ -7836,9 +7820,10 @@ static NTSTATUS smb_set_file_basic_info(connection_struct *conn,
if (fsp != NULL) {
status = check_access_fsp(fsp, FILE_WRITE_ATTRIBUTES);
} else {
status = check_access(conn,
status = smbd_check_access_rights(conn,
conn->cwd_fsp,
smb_fname,
false,
FILE_WRITE_ATTRIBUTES);
}
if (!NT_STATUS_IS_OK(status)) {
@ -7910,9 +7895,10 @@ static NTSTATUS smb_set_info_standard(connection_struct *conn,
if (fsp != NULL) {
status = check_access_fsp(fsp, FILE_WRITE_ATTRIBUTES);
} else {
status = check_access(conn,
status = smbd_check_access_rights(conn,
conn->cwd_fsp,
smb_fname,
false,
FILE_WRITE_ATTRIBUTES);
}
if (!NT_STATUS_IS_OK(status)) {