]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Remove can_write_to_file(). Pathname call no longer used.
authorJeremy Allison <jra@samba.org>
Mon, 7 Jun 2021 17:14:27 +0000 (10:14 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 9 Jun 2021 13:14:30 +0000 (13:14 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/file_access.c
source3/smbd/proto.h

index 54c99b17c5f1058aaddec1d360d72353ebc87da4..59401896d36d912b2b1c670eec4bcac30de78072 100644 (file)
@@ -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.
 ****************************************************************************/
index 321bd20932623114edacbf5371b2768ab56b591e..af798310b41df317ea5f5427439dc0ef7df6178c 100644 (file)
@@ -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);