From: Jeremy Allison Date: Wed, 26 May 2021 18:03:25 +0000 (-0700) Subject: s3: VFS: error_inject. parent_smb_fname() -> SMB_VFS_PARENT_PATHNAME(). X-Git-Tag: tevent-0.11.0~682 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d0e84e28bfc6b8ed0cc44bcc9cf6f021e633895e;p=thirdparty%2Fsamba.git s3: VFS: error_inject. parent_smb_fname() -> SMB_VFS_PARENT_PATHNAME(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- 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; }