summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/reply.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index d9b7500707..257ce7001a 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -6649,6 +6649,8 @@ void reply_mv(struct smb_request *req)
TALLOC_CTX *ctx = talloc_tos();
struct smb_filename *smb_fname_src = NULL;
struct smb_filename *smb_fname_dst = NULL;
+ uint32_t src_ucf_flags = lp_posix_pathnames() ? UCF_UNIX_NAME_LOOKUP : UCF_COND_ALLOW_WCARD_LCOMP;
+ uint32_t dst_ucf_flags = UCF_SAVE_LCOMP | (lp_posix_pathnames() ? 0 : UCF_COND_ALLOW_WCARD_LCOMP);
bool stream_rename = false;
START_PROFILE(SMBmv);
@@ -6691,7 +6693,7 @@ void reply_mv(struct smb_request *req)
conn,
req->flags2 & FLAGS2_DFS_PATHNAMES,
name,
- UCF_COND_ALLOW_WCARD_LCOMP,
+ src_ucf_flags,
&src_has_wcard,
&smb_fname_src);
@@ -6709,7 +6711,7 @@ void reply_mv(struct smb_request *req)
conn,
req->flags2 & FLAGS2_DFS_PATHNAMES,
newname,
- UCF_COND_ALLOW_WCARD_LCOMP | UCF_SAVE_LCOMP,
+ dst_ucf_flags,
&dest_has_wcard,
&smb_fname_dst);