From: Jeremy Allison Date: Tue, 8 Jun 2021 19:27:09 +0000 (-0700) Subject: s3: smbd: open_file(). Pass down the real parent_dir->fsp to smbd_check_access_rights... X-Git-Tag: tevent-0.11.0~520 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=63fb55cd6c697e3f605161a2f8ba01c528ac8238;p=thirdparty%2Fsamba.git s3: smbd: open_file(). Pass down the real parent_dir->fsp to smbd_check_access_rights_fsp(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 43b630c2d80..21dda0f5960 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1365,7 +1365,7 @@ static NTSTATUS open_file(files_struct *fsp, /* Only do this check on non-stream open. */ if (file_existed) { status = smbd_check_access_rights_fsp( - fsp->conn->cwd_fsp, + parent_dir->fsp, fsp, false, access_mask); @@ -1551,7 +1551,7 @@ static NTSTATUS open_file(files_struct *fsp, } } - status = smbd_check_access_rights_fsp(fsp->conn->cwd_fsp, + status = smbd_check_access_rights_fsp(parent_dir->fsp, fsp, false, access_mask);