From: Jeremy Allison Date: Mon, 7 Jun 2021 17:14:27 +0000 (-0700) Subject: s3: smbd: Remove can_write_to_file(). Pathname call no longer used. X-Git-Tag: tevent-0.11.0~557 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b56fc4b0d8e7b0ae327802a66c7c0526acf51cac;p=thirdparty%2Fsamba.git s3: smbd: Remove can_write_to_file(). Pathname call no longer used. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/file_access.c b/source3/smbd/file_access.c index 54c99b17c5f..59401896d36 100644 --- a/source3/smbd/file_access.c +++ b/source3/smbd/file_access.c @@ -136,22 +136,6 @@ bool can_delete_file_in_directory(connection_struct *conn, return ret; } -/**************************************************************************** - Userspace check for write access. -****************************************************************************/ - -bool can_write_to_file(connection_struct *conn, - struct files_struct *dirfsp, - const struct smb_filename *smb_fname) -{ - SMB_ASSERT(dirfsp == conn->cwd_fsp); - return NT_STATUS_IS_OK(smbd_check_access_rights(conn, - dirfsp, - smb_fname, - false, - FILE_WRITE_DATA)); -} - /**************************************************************************** Userspace check for write access to fsp. ****************************************************************************/ diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 321bd209326..af798310b41 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -330,9 +330,6 @@ void reply_openerror(struct smb_request *req, NTSTATUS status); bool can_delete_file_in_directory(connection_struct *conn, struct files_struct *dirfsp, const struct smb_filename *smb_fname); -bool can_write_to_file(connection_struct *conn, - struct files_struct *dirfsp, - const struct smb_filename *smb_fname); bool can_write_to_fsp(struct files_struct *fsp); bool directory_has_default_acl_fsp(struct files_struct *fsp); NTSTATUS can_set_delete_on_close(files_struct *fsp, uint32_t dosmode);