s3: smbd: DFS: Pass uint32_t ucf_flags through into resolve_dfspath_wcard().
authorJeremy Allison <jra@samba.org>
Fri, 25 Mar 2016 18:23:29 +0000 (11:23 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 25 Mar 2016 19:40:10 +0000 (20:40 +0100)
Eventually move this down to the call to unix_convert()
inside the DFS code.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
source3/smbd/filename.c
source3/smbd/msdfs.c
source3/smbd/proto.h
source3/smbd/trans2.c

index 72714666cf3349f1704655efedcecd1ef1b3068b..89c8bd63c357363446c36edb714061b3d9af558c 100644 (file)
@@ -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);
index cab6ff327b647b1e415819dc7302a6058fb4fe8e..4f64eff202dc3c3e6f6beaf245812cb782197ff3 100644 (file)
@@ -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,
index 6f402ab8d7a00093ccc90126e3126a9c7552f326..4be65211d435bcb3cfbe903c1080ec88f8a12b4d 100644 (file)
@@ -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);
index 69276f55db191b88c535fc33fe424c5dea168914..f3510087b0c146230db5eb8b8c95bb0e2e587b35 100644 (file)
@@ -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);