From 6263338f45598b8fb2a712dab562b5458a7e69d3 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 26 May 2021 11:43:16 -0700 Subject: [PATCH] s3: smbd: non_widelink_open(), parent_smb_fname() -> SMB_VFS_PARENT_PATHNAME(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- source3/smbd/open.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index bd42eb62f12..9f7a64cdeba 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -712,7 +712,6 @@ static NTSTATUS non_widelink_open(const struct files_struct *dirfsp, struct smb_filename *parent_dir_fname = NULL; bool have_opath = false; int ret; - bool ok; #ifdef O_PATH have_opath = true; @@ -737,12 +736,12 @@ static NTSTATUS non_widelink_open(const struct files_struct *dirfsp, goto out; } } else { - ok = parent_smb_fname(talloc_tos(), - smb_fname, - &parent_dir_fname, - &smb_fname_rel); - if (!ok) { - status = NT_STATUS_NO_MEMORY; + status = SMB_VFS_PARENT_PATHNAME(fsp->conn, + talloc_tos(), + smb_fname, + &parent_dir_fname, + &smb_fname_rel); + if (!NT_STATUS_IS_OK(status)) { goto out; } } -- 2.47.3