summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2022-02-03 15:54:55 -0800
committerJule Anger <janger@samba.org>2022-02-09 11:09:41 +0000
commit1304041a4fd2fbd5c35b5f5235345b40b5f17bf0 (patch)
treed50466918137a40120e29146abc78be83dd42059
parent01b06586f195a7eb592f18e5f5657ca9f2fa031d (diff)
downloadsamba-1304041a4fd2fbd5c35b5f5235345b40b5f17bf0.tar.gz
s3: libsmb: Call cli_dfs_target_check() from cli_smb1_rename_send().
Strips off any DFS prefix from the target if passed in. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14169 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Noel Power <npower@samba.org> (cherry picked from commit dd0317f6ecb572a80893405daa83e079dbcdf113)
-rw-r--r--source3/libsmb/clifile.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 032c11b5e75..9e15843f120 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -1234,6 +1234,18 @@ static struct tevent_req *cli_smb1_rename_send(TALLOC_CTX *mem_ctx,
return NULL;
}
+ /*
+ * Strip a MSDFS path from fname_dst if we were given one.
+ */
+ status = cli_dfs_target_check(state,
+ cli,
+ fname_src,
+ fname_dst,
+ &fname_dst);
+ if (!NT_STATUS_IS_OK(status)) {
+ goto fail;
+ }
+
if (!push_ucs2_talloc(talloc_tos(), &converted_str, fname_dst,
&converted_size_bytes)) {
status = NT_STATUS_INVALID_PARAMETER;