From d0e84e28bfc6b8ed0cc44bcc9cf6f021e633895e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 26 May 2021 11:03:25 -0700 Subject: [PATCH] s3: VFS: error_inject. parent_smb_fname() -> SMB_VFS_PARENT_PATHNAME(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- source3/modules/vfs_error_inject.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/source3/modules/vfs_error_inject.c b/source3/modules/vfs_error_inject.c index 31257cc1d00..dca8783edaf 100644 --- a/source3/modules/vfs_error_inject.c +++ b/source3/modules/vfs_error_inject.c @@ -133,7 +133,7 @@ static int vfs_error_inject_unlinkat(struct vfs_handle_struct *handle, struct smb_filename *parent_fname = NULL; int error = inject_unix_error("unlinkat", handle); int ret; - bool ok; + NTSTATUS status; if (error == 0) { return SMB_VFS_NEXT_UNLINKAT(handle, dirfsp, smb_fname, flags); @@ -146,9 +146,14 @@ static int vfs_error_inject_unlinkat(struct vfs_handle_struct *handle, return -1; } - ok = parent_smb_fname(full_fname, full_fname, &parent_fname, NULL); - if (!ok) { + status = SMB_VFS_PARENT_PATHNAME(handle->conn, + full_fname, /* TALLOC_CTX. */ + full_fname, + &parent_fname, + NULL); + if (!NT_STATUS_IS_OK(status)) { TALLOC_FREE(full_fname); + errno = map_errno_from_nt_status(status); return -1; } -- 2.47.3