diff --git a/selftest/knownfail.d/msdfs-rename b/selftest/knownfail.d/msdfs-rename deleted file mode 100644 index 1961e5de1fc..00000000000 --- a/selftest/knownfail.d/msdfs-rename +++ /dev/null @@ -1 +0,0 @@ -^samba3.blackbox.smbclient_s3.SMB3.*.Rename\ on\ MS-DFS\ share\(.*\) diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c index 87c56b5564d..13d23ed6566 100644 --- a/source3/libsmb/cli_smb2_fnum.c +++ b/source3/libsmb/cli_smb2_fnum.c @@ -3215,12 +3215,26 @@ struct tevent_req *cli_smb2_rename_send( { struct tevent_req *req = NULL, *subreq = NULL; struct cli_smb2_rename_state *state = NULL; + NTSTATUS status; req = tevent_req_create( mem_ctx, &state, struct cli_smb2_rename_state); if (req == NULL) { 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 (tevent_req_nterror(req, status)) { + return tevent_req_post(req, ev); + } + state->ev = ev; state->cli = cli; state->fname_dst = fname_dst;