]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: RIP dos_mode()
authorRalph Boehme <slow@samba.org>
Mon, 19 Oct 2020 19:14:41 +0000 (21:14 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 16 Dec 2020 09:08:32 +0000 (09:08 +0000)
          .--. .-,       .-..-.__
        .'(`.-` \_.-'-./`  |\_( "\__
     __.>\ ';  _;---,._|   / __/`'--)
    /.--.  : |/' _.--.<|  /  | |
_..-'    `\     /' /`  /_/ _/_/
 >_.-``-. `Y  /' _;---.`|/))))
'` .-''. \|:  .'   __, .-'"`
 .'--._ `-:  \/:  /'  '.\             _|_
     /.'`\ :;   /'      `-           `-|-`
    -`    |     |                      |
          :.; : |                  .-'~^~`-.
          |:    |                .' _     _ `.
          |:.   |                | |_) | |_) |
          :. :  |                | | \ | |   |
          : ;   |                |           |
          : ;   |                |           |
          : ;   |                | dos_mode()|
        .:| . : ;                |           |
-."-/\\\/:::.    `\."-._'."-"_\\-|           |///."-
" -."-.\\"-."//.-".`-."_\\-.".-\\`=.........=`//-".

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

index 5015b5f97323f6ced5c3f843706cc3c1ff38c90b..a4a764bc1793fe1350adafaf4f1964e6bfee0a90 100644 (file)
@@ -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;
index 7a08782dfa3924d4f0d7259dc0d710f2f63b9eb3..38d31839104d95a92a56a35f03e617929e8e4da3 100644 (file)
@@ -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,