s3: smbd: In ntrename OR in ucf_flags, don't overwrite.
authorJeremy Allison <jra@samba.org>
Thu, 18 May 2017 19:08:57 +0000 (12:08 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 22 May 2017 16:41:15 +0000 (18:41 +0200)
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 <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
source3/smbd/nttrans.c

index 55e08146a57ba70826326644765bf434766880bb..31870b941ec59c23bf7f63fe2d9c87c81f4a8416 100644 (file)
@@ -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. */