]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Remove wrapper resolve_dfspath_wcard(). Just call dfs_redirect() directly.
authorJeremy Allison <jra@samba.org>
Tue, 29 Sep 2020 21:24:10 +0000 (14:24 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 30 Sep 2020 20:46:42 +0000 (20:46 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/filename.c
source3/smbd/msdfs.c
source3/smbd/proto.h

index 459f78cf6180619d1b4f3cf2a97ec069d49fcd98..00e5d93cc9531966bd6755b708a6a71fa0ce3d89 100644 (file)
@@ -1823,14 +1823,14 @@ char *get_original_lcomp(TALLOC_CTX *ctx,
        NTSTATUS status;
 
        if (ucf_flags & UCF_DFS_PATHNAME) {
-               status = resolve_dfspath_wcard(ctx,
+               status = dfs_redirect(ctx,
                                conn,
                                filename_in,
                                ucf_flags,
                                !conn->sconn->using_smb2,
                                &fname);
                if (!NT_STATUS_IS_OK(status)) {
-                       DBG_DEBUG("resolve_dfspath "
+                       DBG_DEBUG("dfs_redirect "
                                "failed for name %s with %s\n",
                                filename_in,
                                nt_errstr(status));
@@ -1924,13 +1924,13 @@ static NTSTATUS filename_convert_internal(TALLOC_CTX *ctx,
 
        if (ucf_flags & UCF_DFS_PATHNAME) {
                char *fname = NULL;
-               status = resolve_dfspath_wcard(ctx, conn,
+               status = dfs_redirect(ctx, conn,
                                name_in,
                                ucf_flags,
                                !conn->sconn->using_smb2,
                                &fname);
                if (!NT_STATUS_IS_OK(status)) {
-                       DEBUG(10,("filename_convert_internal: resolve_dfspath "
+                       DEBUG(10,("filename_convert_internal: dfs_redirect "
                                "failed for name %s with %s\n",
                                name_in,
                                nt_errstr(status) ));
index 9878be59633e6d43ca2d5c96ea15e2f06a114292..239df15aba980107b1e6b30df137e30902566732 100644 (file)
@@ -816,7 +816,7 @@ static NTSTATUS dfs_path_lookup(TALLOC_CTX *ctx,
  returned to the client.
 *****************************************************************/
 
-static NTSTATUS dfs_redirect(TALLOC_CTX *ctx,
+NTSTATUS dfs_redirect(TALLOC_CTX *ctx,
                        connection_struct *conn,
                        const char *path_in,
                        uint32_t ucf_flags,
@@ -1803,25 +1803,3 @@ struct junction_map *enum_msdfs_links(TALLOC_CTX *ctx,
        }
        return jn;
 }
-
-/******************************************************************************
- Core function to resolve a dfs pathname.
-******************************************************************************/
-
-NTSTATUS resolve_dfspath_wcard(TALLOC_CTX *ctx,
-                               connection_struct *conn,
-                               const char *name_in,
-                               uint32_t ucf_flags,
-                               bool allow_broken_path,
-                               char **pp_name_out)
-{
-       NTSTATUS status = NT_STATUS_OK;
-
-       status = dfs_redirect(ctx,
-                               conn,
-                               name_in,
-                               ucf_flags,
-                               allow_broken_path,
-                               pp_name_out);
-       return status;
-}
index c25ba5340b7f041be7601105089776f669f50911..149abf9e58979ceda59b3e42f1bb8e79469da61c 100644 (file)
@@ -549,12 +549,12 @@ bool remove_msdfs_link(const struct junction_map *jucn,
 struct junction_map *enum_msdfs_links(TALLOC_CTX *ctx,
                                      struct auth_session_info *session_info,
                                      size_t *p_num_jn);
-NTSTATUS resolve_dfspath_wcard(TALLOC_CTX *ctx,
-                               connection_struct *conn,
-                               const char *name_in,
-                               uint32_t ucf_flags,
-                               bool allow_broken_path,
-                               char **pp_name_out);
+NTSTATUS dfs_redirect(TALLOC_CTX *ctx,
+                       connection_struct *conn,
+                       const char *name_in,
+                       uint32_t ucf_flags,
+                       bool allow_broken_path,
+                       char **pp_name_out);
 struct connection_struct;
 struct smb_filename;
 struct conn_struct_tos {