From: Volker Lendecke Date: Thu, 31 Mar 2022 19:21:30 +0000 (+0200) Subject: smbd: Don't loose base_fsp statinfo in non_widelink_open X-Git-Tag: tevent-0.12.0~179 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57bcbbcacde6d35e056b3a6fc4b7035b17919fe2;p=thirdparty%2Fsamba.git 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 Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 35f57221171..1644d867566 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -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) {