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 <path>\n");
return NT_STATUS_OK;
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;
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;