summaryrefslogtreecommitdiff
path: root/examples/VFS/skel_transparent.c
diff options
context:
space:
mode:
authorRichard Sharpe <rsharpe@samba.org>2016-03-20 12:51:32 -0700
committerJeremy Allison <jra@samba.org>2016-03-27 05:57:17 +0200
commita4e6250442bb7a4ba93cfdb373212da5493faa33 (patch)
tree30637368007b6810ef40e6571869e1a0786d10ca /examples/VFS/skel_transparent.c
parent9377f3bce0866e2fadeea5ba87f7ee41f7d9ba31 (diff)
downloadsamba-a4e6250442bb7a4ba93cfdb373212da5493faa33.tar.gz
s3: vfs: Add VFS functions for setting and getting DOS attributes.
This will make it easier to support those systems and file systems that can store DOS attributes. It should retain the original functionality if VFS functions providing these things are not provided. Signed-off-by: Richard Sharpe <rsharpe@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'examples/VFS/skel_transparent.c')
-rw-r--r--examples/VFS/skel_transparent.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index 9fc943819d6..418ee24f97e 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -801,6 +801,42 @@ static NTSTATUS skel_readdir_attr(struct vfs_handle_struct *handle,
return SMB_VFS_NEXT_READDIR_ATTR(handle, fname, mem_ctx, pattr_data);
}
+static NTSTATUS skel_get_dos_attributes(struct vfs_handle_struct *handle,
+ struct smb_filename *smb_fname,
+ uint32_t *dosmode)
+{
+ return SMB_VFS_NEXT_GET_DOS_ATTRIBUTES(handle,
+ smb_fname,
+ dosmode);
+}
+
+static NTSTATUS skel_fget_dos_attributes(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ uint32_t *dosmode)
+{
+ return SMB_VFS_NEXT_FGET_DOS_ATTRIBUTES(handle,
+ fsp,
+ dosmode);
+}
+
+static NTSTATUS skel_set_dos_attributes(struct vfs_handle_struct *handle,
+ const struct smb_filename *smb_fname,
+ uint32_t dosmode)
+{
+ return SMB_VFS_NEXT_SET_DOS_ATTRIBUTES(handle,
+ smb_fname,
+ dosmode);
+}
+
+static NTSTATUS skel_fset_dos_attributes(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ uint32_t dosmode)
+{
+ return SMB_VFS_NEXT_FSET_DOS_ATTRIBUTES(handle,
+ fsp,
+ dosmode);
+}
+
static NTSTATUS skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
uint32_t security_info,
TALLOC_CTX *mem_ctx,
@@ -1056,6 +1092,12 @@ struct vfs_fn_pointers skel_transparent_fns = {
.fsctl_fn = skel_fsctl,
.readdir_attr_fn = skel_readdir_attr,
+ /* DOS attributes. */
+ .get_dos_attributes_fn = skel_get_dos_attributes,
+ .fget_dos_attributes_fn = skel_fget_dos_attributes,
+ .set_dos_attributes_fn = skel_set_dos_attributes,
+ .fset_dos_attributes_fn = skel_fset_dos_attributes,
+
/* NT ACL operations. */
.fget_nt_acl_fn = skel_fget_nt_acl,