summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2020-02-11 09:48:05 -0800
committerRalph Boehme <slow@samba.org>2020-02-18 21:08:33 +0000
commit9f6c01b2cd82963bfa05552aa41dfafcb0bf7637 (patch)
tree229bad2256ec3213ea44a457786ccf14cff8698c
parent9e92d46b757d6a4cdd0f956c24b30df89adf2798 (diff)
downloadsamba-9f6c01b2cd82963bfa05552aa41dfafcb0bf7637.tar.gz
s3: VFS: cap: Add cap_read_dfs_pathat().
Not yet used. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
-rw-r--r--source3/modules/vfs_cap.c38
1 files changed, 37 insertions, 1 deletions
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c
index bc6daeccca7..e67cb750e0f 100644
--- a/source3/modules/vfs_cap.c
+++ b/source3/modules/vfs_cap.c
@@ -1008,6 +1008,41 @@ static NTSTATUS cap_create_dfs_pathat(vfs_handle_struct *handle,
return status;
}
+static NTSTATUS cap_read_dfs_pathat(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct files_struct *dirfsp,
+ const struct smb_filename *smb_fname,
+ struct referral **ppreflist,
+ size_t *preferral_count)
+{
+ char *cappath = capencode(talloc_tos(), smb_fname->base_name);
+ struct smb_filename *cap_smb_fname = NULL;
+ NTSTATUS status;
+
+ if (cappath == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+ cap_smb_fname = synthetic_smb_fname(talloc_tos(),
+ cappath,
+ NULL,
+ NULL,
+ smb_fname->flags);
+ if (cap_smb_fname == NULL) {
+ TALLOC_FREE(cappath);
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ status = SMB_VFS_NEXT_READ_DFS_PATHAT(handle,
+ mem_ctx,
+ dirfsp,
+ cap_smb_fname,
+ ppreflist,
+ preferral_count);
+ TALLOC_FREE(cappath);
+ TALLOC_FREE(cap_smb_fname);
+ return status;
+}
+
static struct vfs_fn_pointers vfs_cap_fns = {
.disk_free_fn = cap_disk_free,
.get_quota_fn = cap_get_quota,
@@ -1040,7 +1075,8 @@ static struct vfs_fn_pointers vfs_cap_fns = {
.fremovexattr_fn = cap_fremovexattr,
.setxattr_fn = cap_setxattr,
.fsetxattr_fn = cap_fsetxattr,
- .create_dfs_pathat_fn = cap_create_dfs_pathat
+ .create_dfs_pathat_fn = cap_create_dfs_pathat,
+ .read_dfs_pathat_fn = cap_read_dfs_pathat
};
static_decl_vfs;