From: Jeremy Allison Date: Tue, 26 Jul 2022 21:29:21 +0000 (-0700) Subject: s3: smbd: In openat_pathref_dirfsp_nosymlink() ensure we call fsp_smb_fname_link... X-Git-Tag: samba-4.17.0rc1~265 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=31479d7781d3e566d9f6258016a13f349fe05389;p=thirdparty%2Fsamba.git s3: smbd: In openat_pathref_dirfsp_nosymlink() ensure we call fsp_smb_fname_link() to set smb_fname->fsp in the returned smb_fname. Instead of just assigning smb_fname->fsp = fsp. This makes the logic match that of openat_pathref_fullname() and parent_pathref() when returning smb_fnames with associated pathref fsp's. Signed-off-by: Jeremy Allison Reviewed-by: Volker Lendecke --- diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 5d8e292714f..9a81a16b3ec 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -944,7 +944,12 @@ next: goto nomem; } - result->fsp = fsp; + status = fsp_smb_fname_link(fsp, + &result->fsp_link, + &result->fsp); + if (!NT_STATUS_IS_OK(status)) { + goto fail; + } talloc_set_destructor(result, smb_fname_fsp_destructor); *_smb_fname = result;