]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: We now know get_original_lcomp() never has to deal with an MSDFS pathname.
authorJeremy Allison <jra@samba.org>
Wed, 3 Aug 2022 18:45:39 +0000 (11:45 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 4 Aug 2022 17:09:31 +0000 (17:09 +0000)
Remove the call to dfs_redirect() within it.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/smbd/filename.c

index ed5e8815719e1fadf0268ffdae585f2dac4382c4..3dd62bab62573c2f10d73b8eb773da54d85d834a 100644 (file)
@@ -1893,41 +1893,16 @@ char *get_original_lcomp(TALLOC_CTX *ctx,
                        const char *filename_in,
                        uint32_t ucf_flags)
 {
-       struct smb_filename *smb_fname = NULL;
        char *last_slash = NULL;
        char *orig_lcomp;
-       char *fname = NULL;
-       NTTIME twrp = 0;
        NTSTATUS status;
 
-       if (ucf_flags & UCF_DFS_PATHNAME) {
-               status = dfs_redirect(ctx,
-                               conn,
-                               filename_in,
-                               ucf_flags,
-                               !conn->sconn->using_smb2,
-                               &twrp,
-                               &fname);
-               if (!NT_STATUS_IS_OK(status)) {
-                       DBG_DEBUG("dfs_redirect "
-                               "failed for name %s with %s\n",
-                               filename_in,
-                               nt_errstr(status));
-                       return NULL;
-               }
-               filename_in = fname;
-               ucf_flags &= ~UCF_DFS_PATHNAME;
-       }
-
        last_slash = strrchr(filename_in, '/');
        if (last_slash != NULL) {
                orig_lcomp = talloc_strdup(ctx, last_slash+1);
        } else {
                orig_lcomp = talloc_strdup(ctx, filename_in);
        }
-       /* We're done with any temp names here. */
-       TALLOC_FREE(smb_fname);
-       TALLOC_FREE(fname);
        if (orig_lcomp == NULL) {
                return NULL;
        }