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)
committerRalph Boehme <slow@samba.org>
Wed, 7 Dec 2016 06:58:26 +0000 (07:58 +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>
source3/smbd/reply.c

index 0aec4338c3250edd3f3b4aeabddc04f5b733e7a7..6ddfa4f4de7ac06dbc68aa26b9c53d09f78cd069 100644 (file)
@@ -6812,6 +6812,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);