diff options
author | Jeremy Allison <jra@samba.org> | 2022-02-03 14:51:13 -0800 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2022-02-04 11:10:33 +0000 |
commit | 4bdbe3c2fc0c35635474ae526896b28f55142aca (patch) | |
tree | a2d4fcd81451ec2a301b52c1abe3484789a0c0a1 /source3/libsmb/clifile.c | |
parent | 2abba0ea109d7a3a0b0cb4a7030293f70c2d9d8a (diff) | |
download | samba-4bdbe3c2fc0c35635474ae526896b28f55142aca.tar.gz |
s3: libsmb: Call cli_dfs_target_check() from cli_smb2_hardlink_send().
Currently we don't pass MSDFS names as targets here, but a caller
may erroneously do this later, and for non-DFS names this is a no-op.
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>
Diffstat (limited to 'source3/libsmb/clifile.c')
-rw-r--r-- | source3/libsmb/clifile.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index 3c3f44923fc..a65b79365ad 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -1682,12 +1682,26 @@ static struct tevent_req *cli_smb2_hardlink_send( { struct tevent_req *req = NULL, *subreq = NULL; struct cli_smb2_hardlink_state *state = NULL; + NTSTATUS status; req = tevent_req_create( mem_ctx, &state, struct cli_smb2_hardlink_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; |