From: Jeremy Allison Date: Wed, 3 Aug 2022 18:45:39 +0000 (-0700) Subject: s3: smbd: We now know get_original_lcomp() never has to deal with an MSDFS pathname. X-Git-Tag: samba-4.17.0rc1~79 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5a923ae36ab6e458987dbb0296b8dae1de35bd87;p=thirdparty%2Fsamba.git s3: smbd: We now know get_original_lcomp() never has to deal with an MSDFS pathname. Remove the call to dfs_redirect() within it. Signed-off-by: Jeremy Allison Reviewed-by: Volker Lendecke --- diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index ed5e8815719..3dd62bab625 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -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; }