]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: use fdos_mode() in can_rename()
authorRalph Boehme <slow@samba.org>
Mon, 19 Oct 2020 18:42:41 +0000 (20:42 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 16 Dec 2020 09:08:32 +0000 (09:08 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/reply.c

index 6bf8d16d301c8c370ce7e59ade219c44d331f982..0a3b359d3debe1327341f37d2795b3973a5c1eb1 100644 (file)
@@ -3083,7 +3083,7 @@ static NTSTATUS can_rename(connection_struct *conn, files_struct *fsp,
                        (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) {
                /* Only bother to read the DOS attribute if we might deny the
                   rename on the grounds of attribute mismatch. */
-               uint32_t fmode = dos_mode(conn, fsp->fsp_name);
+               uint32_t fmode = fdos_mode(fsp);
                if ((fmode & ~dirtype) & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) {
                        return NT_STATUS_NO_SUCH_FILE;
                }