1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-25 17:57:42 +03:00

s3: libsmb: Call cli_dfs_target_check() from cli_smb2_rename_send().

Strips off any DFS prefix from the target if passed in.

Remove knownfail selftest/knownfail.d/msdfs-rename.

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>

Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Fri Feb  4 12:02:36 UTC 2022 on sn-devel-184
This commit is contained in:
Jeremy Allison 2022-02-03 15:59:51 -08:00 committed by Noel Power
parent 4473aea926
commit b9b82f3611
2 changed files with 14 additions and 1 deletions

View File

@ -1 +0,0 @@
^samba3.blackbox.smbclient_s3.SMB3.*.Rename\ on\ MS-DFS\ share\(.*\)

View File

@ -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;