]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: rename - missing early error exit if source and destination prefixes are...
authorJeremy Allison <jra@samba.org>
Mon, 5 Dec 2016 22:13:14 +0000 (14:13 -0800)
committerKarolin Seeger <kseeger@samba.org>
Mon, 2 Jan 2017 10:56:53 +0000 (11:56 +0100)
Noticed by Michael Zeis <mzeis.quantum@gmail.com>.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12460

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 2bfad1c9d3237ad8d174b7dc2d1e6e3c53fdb8dc)

source3/smbd/reply.c

index 6b16458e19cad3df3b964bd4c5c88d07fbf5110d..9504d1b3039e0df4f94282688fea8861b61395bd 100644 (file)
@@ -6769,6 +6769,7 @@ NTSTATUS rename_internals_fsp(connection_struct *conn,
 
        if (rename_path_prefix_equal(fsp->fsp_name, smb_fname_dst)) {
                status = NT_STATUS_ACCESS_DENIED;
+               goto out;
        }
 
        lck = get_existing_share_mode_lock(talloc_tos(), fsp->file_id);