]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: remove a redundant fstat()in create_file_unixpath()
authorRalph Boehme <slow@samba.org>
Mon, 1 Feb 2021 11:03:08 +0000 (12:03 +0100)
committerRalph Boehme <slow@samba.org>
Fri, 5 Feb 2021 06:22:35 +0000 (06:22 +0000)
openat_pathref_fsp() deep inside already calls fstat().

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/open.c

index 68bc3ac4f8c1a419ebf569371c0ab63449eba5f4..ca870c6a6b1fe9978982ead65a222764c861ea28 100644 (file)
@@ -5745,14 +5745,6 @@ static NTSTATUS create_file_unixpath(connection_struct *conn,
                                goto fail;
                        }
 
-                       ret = SMB_VFS_FSTAT(smb_fname_base->fsp,
-                                           &smb_fname_base->st);
-                       if (ret != 0) {
-                               DBG_DEBUG("Unable to stat stream [%s]: %s\n",
-                                         smb_fname_str_dbg(smb_fname_base),
-                                         strerror(errno));
-                       }
-
                        /*
                         * https://bugzilla.samba.org/show_bug.cgi?id=10229
                         * We need to check if the requested access mask