s3: smbd: Remove open_file_fchmod().
authorJeremy Allison <jra@samba.org>
Thu, 1 May 2014 18:11:20 +0000 (11:11 -0700)
committerKarolin Seeger <kseeger@samba.org>
Mon, 19 May 2014 10:20:12 +0000 (12:20 +0200)
No longer used (hurrah!).

Bug 10564 - Lock order violation and file lost

https://bugzilla.samba.org/show_bug.cgi?id=10564

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri May  2 23:47:38 CEST 2014 on sn-devel-104

source3/smbd/open.c
source3/smbd/proto.h

index a596bceb1817c5d9f690a6e1b086cc42528cdcf1..6d4f199f4bb69cd2dac52201d007fc4ef788710b 100644 (file)
@@ -2824,39 +2824,6 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
        return NT_STATUS_OK;
 }
 
-
-/****************************************************************************
- Open a file for for write to ensure that we can fchmod it.
-****************************************************************************/
-
-NTSTATUS open_file_fchmod(connection_struct *conn,
-                         struct smb_filename *smb_fname,
-                         files_struct **result)
-{
-       if (!VALID_STAT(smb_fname->st)) {
-               return NT_STATUS_INVALID_PARAMETER;
-       }
-
-        return SMB_VFS_CREATE_FILE(
-               conn,                                   /* conn */
-               NULL,                                   /* req */
-               0,                                      /* root_dir_fid */
-               smb_fname,                              /* fname */
-               FILE_WRITE_DATA,                        /* access_mask */
-               (FILE_SHARE_READ | FILE_SHARE_WRITE |   /* share_access */
-                   FILE_SHARE_DELETE),
-               FILE_OPEN,                              /* create_disposition*/
-               0,                                      /* create_options */
-               0,                                      /* file_attributes */
-               INTERNAL_OPEN_ONLY,                     /* oplock_request */
-               0,                                      /* allocation_size */
-               0,                                      /* private_flags */
-               NULL,                                   /* sd */
-               NULL,                                   /* ea_list */
-               result,                                 /* result */
-               NULL);                                  /* pinfo */
-}
-
 static NTSTATUS mkdir_internal(connection_struct *conn,
                               struct smb_filename *smb_dname,
                               uint32 file_attributes)
index b89015bf92ae0b3a05220a175f32c3de093e5739..79978a1fb659700bd5923f08d8455a2aad9fb5d4 100644 (file)
@@ -626,9 +626,6 @@ bool is_stat_open(uint32 access_mask);
 void remove_deferred_open_entry(struct file_id id, uint64_t mid,
                                struct server_id pid);
 bool is_deferred_open_async(const void *ptr);
-NTSTATUS open_file_fchmod(connection_struct *conn,
-                         struct smb_filename *smb_fname,
-                         files_struct **result);
 NTSTATUS create_directory(connection_struct *conn, struct smb_request *req,
                          struct smb_filename *smb_dname);
 void msg_file_was_renamed(struct messaging_context *msg,