From b96ae7c69e48ecfc147b032d3d6e00a1ce65d226 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 25 Mar 2016 11:23:29 -0700 Subject: [PATCH] s3: smbd: DFS: Pass uint32_t ucf_flags through into resolve_dfspath_wcard(). Eventually move this down to the call to unix_convert() inside the DFS code. Signed-off-by: Jeremy Allison Reviewed-by: Richard Sharpe --- source3/smbd/filename.c | 3 +-- source3/smbd/msdfs.c | 4 +++- source3/smbd/proto.h | 2 +- source3/smbd/trans2.c | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 72714666cf3..89c8bd63c35 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -1401,7 +1401,6 @@ static NTSTATUS filename_convert_internal(TALLOC_CTX *ctx, struct smb_filename **pp_smb_fname) { NTSTATUS status; - bool allow_wcards = (ucf_flags & (UCF_COND_ALLOW_WCARD_LCOMP|UCF_ALWAYS_ALLOW_WCARD_LCOMP)); char *fname = NULL; *pp_smb_fname = NULL; @@ -1409,7 +1408,7 @@ static NTSTATUS filename_convert_internal(TALLOC_CTX *ctx, status = resolve_dfspath_wcard(ctx, conn, dfs_path, name_in, - allow_wcards, + ucf_flags, !conn->sconn->using_smb2, &fname, ppath_contains_wcard); diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index cab6ff327b6..4f64eff202d 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -1666,13 +1666,15 @@ NTSTATUS resolve_dfspath_wcard(TALLOC_CTX *ctx, connection_struct *conn, bool dfs_pathnames, const char *name_in, - bool allow_wcards, + uint32_t ucf_flags, bool allow_broken_path, char **pp_name_out, bool *ppath_contains_wcard) { bool path_contains_wcard; NTSTATUS status = NT_STATUS_OK; + bool allow_wcards = (ucf_flags & + (UCF_COND_ALLOW_WCARD_LCOMP|UCF_ALWAYS_ALLOW_WCARD_LCOMP)); if (dfs_pathnames) { status = dfs_redirect(ctx, diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 6f402ab8d7a..4be65211d43 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -488,7 +488,7 @@ NTSTATUS resolve_dfspath_wcard(TALLOC_CTX *ctx, connection_struct *conn, bool dfs_pathnames, const char *name_in, - bool allow_wcards, + uint32_t ucf_flags, bool allow_broken_path, char **pp_name_out, bool *ppath_contains_wcard); diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 69276f55db1..f3510087b0c 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -6876,7 +6876,7 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn, status = resolve_dfspath_wcard(ctx, conn, req->flags2 & FLAGS2_DFS_PATHNAMES, newname, - true, + UCF_COND_ALLOW_WCARD_LCOMP, !conn->sconn->using_smb2, &newname, &dest_has_wcard); -- 2.47.3