summaryrefslogtreecommitdiffstats
path: root/examples/VFS
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2014-11-26 14:30:37 +0100
committerJeremy Allison <jra@samba.org>2014-12-04 22:11:07 +0100
commitb65e37dc01d7afa007768f7cadfcf3b7c1007664 (patch)
treeec45710c1b260aedc21a4f5767f4465ab0817edd /examples/VFS
parent46431e390f8184c4207f48704e0a0bb5dcb38366 (diff)
downloadsamba-b65e37dc01d7afa007768f7cadfcf3b7c1007664.tar.gz
samba-b65e37dc01d7afa007768f7cadfcf3b7c1007664.tar.xz
samba-b65e37dc01d7afa007768f7cadfcf3b7c1007664.zip
s3:vfs: add SMB_VFS_READDIR_ATTR()
SMB_VFS_READDIR_ATTR is a last minute hook to fetch additional metadata for a directory entry when we're already marshalling the SMB reply buffer. This would be used, when there's a need to repurpose some fields in the the reply, like it's done with Apple's SMB2 extension "AAPL". Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'examples/VFS')
-rw-r--r--examples/VFS/skel_opaque.c9
-rw-r--r--examples/VFS/skel_transparent.c9
2 files changed, 18 insertions, 0 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 47b46a4db7..6e15a0675b 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -633,6 +633,14 @@ static NTSTATUS skel_fsctl(struct vfs_handle_struct *handle,
return NT_STATUS_NOT_IMPLEMENTED;
}
+static NTSTATUS skel_readdir_attr(struct vfs_handle_struct *handle,
+ const struct smb_filename *fname,
+ TALLOC_CTX *mem_ctx,
+ struct readdir_attr_data **pattr_data)
+{
+ return NT_STATUS_NOT_IMPLEMENTED;
+}
+
static NTSTATUS skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
uint32 security_info,
TALLOC_CTX *mem_ctx,
@@ -896,6 +904,7 @@ struct vfs_fn_pointers skel_opaque_fns = {
.strict_unlock_fn = skel_strict_unlock,
.translate_name_fn = skel_translate_name,
.fsctl_fn = skel_fsctl,
+ .readdir_attr_fn = skel_readdir_attr,
/* NT ACL operations. */
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index fbb1323a6e..b11e29c342 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -759,6 +759,14 @@ static NTSTATUS skel_fsctl(struct vfs_handle_struct *handle,
in_len, _out_data, max_out_len, out_len);
}
+static NTSTATUS skel_readdir_attr(struct vfs_handle_struct *handle,
+ const struct smb_filename *fname,
+ TALLOC_CTX *mem_ctx,
+ struct readdir_attr_data **pattr_data)
+{
+ return SMB_VFS_NEXT_READDIR_ATTR(handle, fname, mem_ctx, pattr_data);
+}
+
static NTSTATUS skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
uint32 security_info,
TALLOC_CTX *mem_ctx,
@@ -1005,6 +1013,7 @@ struct vfs_fn_pointers skel_transparent_fns = {
.strict_unlock_fn = skel_strict_unlock,
.translate_name_fn = skel_translate_name,
.fsctl_fn = skel_fsctl,
+ .readdir_attr_fn = skel_readdir_attr,
/* NT ACL operations. */