From: Ralph Boehme Date: Mon, 19 Oct 2020 19:14:41 +0000 (+0200) Subject: smbd: RIP dos_mode() X-Git-Tag: samba-4.14.0rc1~264 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2317583b5e15a0f355f0a04502edf8791a23e8aa;p=thirdparty%2Fsamba.git smbd: RIP dos_mode() .--. .-, .-..-.__ .'(`.-` \_.-'-./` |\_( "\__ __.>\ '; _;---,._| / __/`'--) /.--. : |/' _.--.<| / | | _..-' `\ /' /` /_/ _/_/ >_.-``-. `Y /' _;---.`|/)))) '` .-''. \|: .' __, .-'"` .'--._ `-: \/: /' '.\ _|_ /.'`\ :; /' `- `-|-` -` | | | :.; : | .-'~^~`-. |: | .' _ _ `. |:. | | |_) | |_) | :. : | | | \ | | | : ; | | | : ; | | | : ; | | dos_mode()| .:| . : ; | | -."-/\\\/:::. `\."-._'."-"_\\-| |///."- " -."-.\\"-."//.-".`-."_\\-.".-\\`=.........=`//-". Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index 5015b5f9732..a4a764bc179 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -757,32 +757,6 @@ static uint32_t dos_mode_post(uint32_t dosmode, if "store dos attributes" is true. ****************************************************************************/ -uint32_t dos_mode(connection_struct *conn, struct smb_filename *smb_fname) -{ - uint32_t result = 0; - NTSTATUS status = NT_STATUS_OK; - - DEBUG(8,("dos_mode: %s\n", smb_fname_str_dbg(smb_fname))); - - if (!VALID_STAT(smb_fname->st)) { - return 0; - } - - /* Get the DOS attributes via the VFS if we can */ - status = SMB_VFS_GET_DOS_ATTRIBUTES(conn, smb_fname, &result); - if (!NT_STATUS_IS_OK(status)) { - /* - * Only fall back to using UNIX modes if we get NOT_IMPLEMENTED. - */ - if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_IMPLEMENTED)) { - result |= dos_mode_from_sbuf(conn, smb_fname); - } - } - - result = dos_mode_post(result, conn, NULL, smb_fname, __func__); - return result; -} - uint32_t fdos_mode(struct files_struct *fsp) { uint32_t result = 0; diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 7a08782dfa3..38d31839104 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -267,7 +267,6 @@ mode_t unix_mode(connection_struct *conn, int dosmode, struct smb_filename *smb_fname_parent); uint32_t dos_mode_msdfs(connection_struct *conn, const struct smb_filename *smb_fname); -uint32_t dos_mode(connection_struct *conn, struct smb_filename *smb_fname); uint32_t fdos_mode(struct files_struct *fsp); struct tevent_req *dos_mode_at_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,