mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s3: libsmb: In cli_cifs_rename_send() (SMBmv) check for DFS source pathname.
smbtorture3: SMB1-DFS-PATHS: test_smb1_mv() shows SMBmv uses DFS for src and dst. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Noel Power <npower@samba.org>
This commit is contained in:
parent
2d28696efe
commit
4da3c724d5
@ -1332,6 +1332,7 @@ static struct tevent_req *cli_cifs_rename_send(TALLOC_CTX *mem_ctx,
|
||||
uint8_t additional_flags = 0;
|
||||
uint16_t additional_flags2 = 0;
|
||||
uint8_t *bytes = NULL;
|
||||
char *fname_src_cp = NULL;
|
||||
NTSTATUS status;
|
||||
|
||||
req = tevent_req_create(mem_ctx, &state, struct cli_cifs_rename_state);
|
||||
@ -1364,9 +1365,22 @@ static struct tevent_req *cli_cifs_rename_send(TALLOC_CTX *mem_ctx,
|
||||
if (tevent_req_nomem(bytes, req)) {
|
||||
return tevent_req_post(req, ev);
|
||||
}
|
||||
|
||||
/*
|
||||
* SMBmv on a DFS share uses DFS names for src and dst.
|
||||
* See smbtorture3: SMB1-DFS-PATHS: test_smb1_mv().
|
||||
*/
|
||||
|
||||
fname_src_cp = smb1_dfs_share_path(state, cli, fname_src);
|
||||
if (tevent_req_nomem(fname_src_cp, req)) {
|
||||
return tevent_req_post(req, ev);
|
||||
}
|
||||
bytes[0] = 4;
|
||||
bytes = smb_bytes_push_str(bytes, smbXcli_conn_use_unicode(cli->conn), fname_src,
|
||||
strlen(fname_src)+1, NULL);
|
||||
bytes = smb_bytes_push_str(bytes,
|
||||
smbXcli_conn_use_unicode(cli->conn),
|
||||
fname_src_cp,
|
||||
strlen(fname_src_cp)+1,
|
||||
NULL);
|
||||
if (tevent_req_nomem(bytes, req)) {
|
||||
return tevent_req_post(req, ev);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user