From 0e88fc373561ca959423bb565ea9d68b32c4dc0e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 24 May 2021 11:15:29 -0700 Subject: [PATCH] s3: smbd: Change open_file() to use check_parent_access_fsp() instead of check_parent_access(). No more uses of check_parent_access(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- source3/smbd/open.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 120d6bb58fe..0992a4f04f6 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1571,16 +1571,16 @@ static NTSTATUS open_file(files_struct *fsp, return NT_STATUS_OBJECT_NAME_NOT_FOUND; } - status = check_parent_access(conn, - conn->cwd_fsp, - smb_fname, + status = check_parent_access_fsp( + parent_dir->fsp, SEC_DIR_ADD_FILE); if (!NT_STATUS_IS_OK(status)) { - DEBUG(10, ("open_file: " - "check_parent_access on " - "file %s returned %s\n", - smb_fname_str_dbg(smb_fname), - nt_errstr(status) )); + DBG_DEBUG("check_parent_access_fsp on " + "directory %s for file %s " + "returned %s\n", + smb_fname_str_dbg(parent_dir), + smb_fname_str_dbg(smb_fname), + nt_errstr(status)); return status; } } -- 2.47.3