From: Jeremy Allison Date: Mon, 24 May 2021 18:15:29 +0000 (-0700) Subject: s3: smbd: Change open_file() to use check_parent_access_fsp() instead of check_parent... X-Git-Tag: tevent-0.11.0~603 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0e88fc373561ca959423bb565ea9d68b32c4dc0e;p=thirdparty%2Fsamba.git 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 --- 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; } }