From: Jeremy Allison Date: Thu, 20 May 2021 22:20:42 +0000 (-0700) Subject: s3: smbd: Make mkdir_internal() use check_parent_access_fsp(). X-Git-Tag: tevent-0.11.0~614 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d5e5095c062adf83492939fdfb11fdce11027aa;p=thirdparty%2Fsamba.git s3: smbd: Make mkdir_internal() use check_parent_access_fsp(). We already have a parent pathref fsp here. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index a8c3ec39239..2013ac6ced0 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -4440,16 +4440,13 @@ static NTSTATUS mkdir_internal(connection_struct *conn, parent_dir_fname); } - status = check_parent_access(conn, - conn->cwd_fsp, - smb_dname, - access_mask); + status = check_parent_access_fsp(parent_dir_fname->fsp, access_mask); if(!NT_STATUS_IS_OK(status)) { - DEBUG(5,("mkdir_internal: check_parent_access " + DBG_INFO("check_parent_access_fsp " "on directory %s for path %s returned %s\n", smb_fname_str_dbg(parent_dir_fname), smb_dname->base_name, - nt_errstr(status) )); + nt_errstr(status)); TALLOC_FREE(parent_dir_fname); return status; }