]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: can_delete_file_in_directory(), we no longer need to do the SMB_VFS_STAT...
authorJeremy Allison <jra@samba.org>
Tue, 8 Jun 2021 18:15:59 +0000 (11:15 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 9 Jun 2021 13:14:31 +0000 (13:14 +0000)
All code paths must have a valid stat here.

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

index 71469fea31ccc2abefb1907ed4c0b75ac2dab683..0f3ad4ba844b86e28ad7cc56e81eb8303cbc32f8 100644 (file)
@@ -71,10 +71,7 @@ bool can_delete_file_in_directory(connection_struct *conn,
                }
        }
 
-       if(SMB_VFS_STAT(conn, smb_fname_parent) != 0) {
-               ret = false;
-               goto out;
-       }
+       SMB_ASSERT(VALID_STAT(smb_fname_parent->st));
 
        /* fast paths first */