1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

smbd: Don't loose base_fsp statinfo in non_widelink_open

smb_fname_rel came from SMB_VFS_PARENT_PATHNAME() without a reference
to the underlying base_fsp. We want to pass the existing stat-info to
the VFS objects, so when creating the relative base fsp_name we should
copy the stat-info from the base fsp we were handed, not the fake one
that we just made up in SMB_VFS_PARENT_PATHNAME()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2022-03-31 21:21:30 +02:00 committed by Jeremy Allison
parent b15c249757
commit 57bcbbcacd

View File

@ -745,7 +745,7 @@ static NTSTATUS non_widelink_open(const struct files_struct *dirfsp,
talloc_tos(),
smb_fname_rel->base_name,
NULL,
&smb_fname_rel->st,
&fsp->base_fsp->fsp_name->st,
smb_fname_rel->twrp,
smb_fname_rel->flags);
if (base_smb_fname_rel == NULL) {