From 29ec4744542230c93c209acfe2a5d6144707b332 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 May 2017 12:08:57 -0700 Subject: [PATCH] s3: smbd: In ntrename OR in ucf_flags, don't overwrite. This isn't worth a bug backport as right now the only flag that could be overwritten is the UCF_POSIX_PATHNAMES flag, and for a POSIX connection the client will use posix rename, not an ntrename. Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni --- source3/smbd/nttrans.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 55e08146a57..31870b941ec 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -1627,8 +1627,8 @@ void reply_ntrename(struct smb_request *req) * destination's last component. */ if (rename_type == RENAME_FLAG_RENAME) { - ucf_flags_src = UCF_COND_ALLOW_WCARD_LCOMP; - ucf_flags_dst = UCF_COND_ALLOW_WCARD_LCOMP | UCF_SAVE_LCOMP; + ucf_flags_src |= UCF_COND_ALLOW_WCARD_LCOMP; + ucf_flags_dst |= UCF_COND_ALLOW_WCARD_LCOMP | UCF_SAVE_LCOMP; } /* rename_internals() calls unix_convert(), so don't call it here. */ -- 2.47.2