From: Ralph Boehme Date: Mon, 19 Oct 2020 18:42:41 +0000 (+0200) Subject: smbd: use fdos_mode() in can_rename() X-Git-Tag: samba-4.14.0rc1~282 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d0c60ffd56d80a986c84dabf1b30cb869f8a269;p=thirdparty%2Fsamba.git smbd: use fdos_mode() in can_rename() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 6bf8d16d301..0a3b359d3de 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -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; }