From: Noel Power Date: Fri, 5 Feb 2021 17:10:20 +0000 (+0000) Subject: s3/torture: migrate SMB_VFS_FLISTXATTR calls to SMB_VFS_FLISTXATTR X-Git-Tag: tevent-0.11.0~1712 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=435119c49507f6c8693decacccf63fe8351413c4;p=thirdparty%2Fsamba.git s3/torture: migrate SMB_VFS_FLISTXATTR calls to SMB_VFS_FLISTXATTR Signed-off-by: Noel Power Reviewed-by: Jeremy Allison --- diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c index b47cdea4929..9b1fa1bbdfe 100644 --- a/source3/torture/cmd_vfs.c +++ b/source3/torture/cmd_vfs.c @@ -1402,7 +1402,8 @@ static NTSTATUS cmd_listxattr(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, char *buf, *p; ssize_t ret; struct smb_filename *smb_fname = NULL; - + struct smb_filename *pathref_fname = NULL; + NTSTATUS status; if (argc != 2) { printf("Usage: listxattr \n"); return NT_STATUS_OK; @@ -1416,7 +1417,19 @@ static NTSTATUS cmd_listxattr(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, if (smb_fname == NULL) { return NT_STATUS_NO_MEMORY; } - ret = SMB_VFS_LISTXATTR(vfs->conn, smb_fname, + status = synthetic_pathref(mem_ctx, + vfs->conn->cwd_fsp, + smb_fname->base_name, + NULL, + NULL, + smb_fname->twrp, + smb_fname->flags, + &pathref_fname); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + ret = SMB_VFS_FLISTXATTR(pathref_fname->fsp, buf, talloc_get_size(buf)); if (ret == -1) { int err = errno; @@ -1427,7 +1440,7 @@ static NTSTATUS cmd_listxattr(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, if (buf == NULL) { return NT_STATUS_NO_MEMORY; } - ret = SMB_VFS_LISTXATTR(vfs->conn, smb_fname, + ret = SMB_VFS_FLISTXATTR(pathref_fname->fsp, buf, talloc_get_size(buf)); if (ret == -1) { int err = errno;