From: Ralph Boehme Date: Tue, 27 Oct 2020 11:23:00 +0000 (+0100) Subject: smbd: replace calls to check_access() with smbd_check_access_rights() X-Git-Tag: samba-4.14.0rc1~584 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f0008a992b60fda8f2eb04553b547029bb421fc;p=thirdparty%2Fsamba.git 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 Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index ae790e10705..5266e8f316b 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -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)) {