mirror of
https://github.com/samba-team/samba.git
synced 2025-02-08 05:57:51 +03:00
s3: VFS: streams_xattr: Add impl for SMB_VFS_FSTREAMINFO
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
a23667a03a
commit
a8eb80a578
@ -886,6 +886,47 @@ static NTSTATUS streams_xattr_streaminfo(vfs_handle_struct *handle,
|
|||||||
pstreams);
|
pstreams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static NTSTATUS streams_xattr_fstreaminfo(vfs_handle_struct *handle,
|
||||||
|
struct files_struct *fsp,
|
||||||
|
TALLOC_CTX *mem_ctx,
|
||||||
|
unsigned int *pnum_streams,
|
||||||
|
struct stream_struct **pstreams)
|
||||||
|
{
|
||||||
|
NTSTATUS status;
|
||||||
|
struct streaminfo_state state;
|
||||||
|
|
||||||
|
state.streams = *pstreams;
|
||||||
|
state.num_streams = *pnum_streams;
|
||||||
|
state.mem_ctx = mem_ctx;
|
||||||
|
state.handle = handle;
|
||||||
|
state.status = NT_STATUS_OK;
|
||||||
|
|
||||||
|
status = walk_xattr_streams(handle,
|
||||||
|
fsp,
|
||||||
|
fsp->fsp_name,
|
||||||
|
collect_one_stream,
|
||||||
|
&state);
|
||||||
|
|
||||||
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
|
TALLOC_FREE(state.streams);
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!NT_STATUS_IS_OK(state.status)) {
|
||||||
|
TALLOC_FREE(state.streams);
|
||||||
|
return state.status;
|
||||||
|
}
|
||||||
|
|
||||||
|
*pnum_streams = state.num_streams;
|
||||||
|
*pstreams = state.streams;
|
||||||
|
|
||||||
|
return SMB_VFS_NEXT_FSTREAMINFO(handle,
|
||||||
|
fsp,
|
||||||
|
mem_ctx,
|
||||||
|
pnum_streams,
|
||||||
|
pstreams);
|
||||||
|
}
|
||||||
|
|
||||||
static uint32_t streams_xattr_fs_capabilities(struct vfs_handle_struct *handle,
|
static uint32_t streams_xattr_fs_capabilities(struct vfs_handle_struct *handle,
|
||||||
enum timestamp_set_resolution *p_ts_res)
|
enum timestamp_set_resolution *p_ts_res)
|
||||||
{
|
{
|
||||||
@ -1609,6 +1650,7 @@ static struct vfs_fn_pointers vfs_streams_xattr_fns = {
|
|||||||
.ftruncate_fn = streams_xattr_ftruncate,
|
.ftruncate_fn = streams_xattr_ftruncate,
|
||||||
.fallocate_fn = streams_xattr_fallocate,
|
.fallocate_fn = streams_xattr_fallocate,
|
||||||
.streaminfo_fn = streams_xattr_streaminfo,
|
.streaminfo_fn = streams_xattr_streaminfo,
|
||||||
|
.fstreaminfo_fn = streams_xattr_fstreaminfo,
|
||||||
|
|
||||||
.fsync_send_fn = streams_xattr_fsync_send,
|
.fsync_send_fn = streams_xattr_fsync_send,
|
||||||
.fsync_recv_fn = streams_xattr_fsync_recv,
|
.fsync_recv_fn = streams_xattr_fsync_recv,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user