From: Jeremy Allison Date: Mon, 5 Dec 2016 22:13:14 +0000 (-0800) Subject: s3: smbd: rename - missing early error exit if source and destination prefixes are... X-Git-Tag: samba-4.4.9~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47f6f77426449da1cba5400329aadd996dae1c4d;p=thirdparty%2Fsamba.git s3: smbd: rename - missing early error exit if source and destination prefixes are different. Noticed by Michael Zeis . BUG: https://bugzilla.samba.org/show_bug.cgi?id=12460 Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme (cherry picked from commit 2bfad1c9d3237ad8d174b7dc2d1e6e3c53fdb8dc) --- diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 6b16458e19c..9504d1b3039 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -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);