summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2020-02-11 10:02:00 -0800
committerRalph Boehme <slow@samba.org>2020-02-18 21:08:33 +0000
commit16acdc348db71a29bec93d62073ca30a4a920389 (patch)
tree94521f478ef17349b48f31a8eb0d137c5097e33b
parent9f6c01b2cd82963bfa05552aa41dfafcb0bf7637 (diff)
downloadsamba-16acdc348db71a29bec93d62073ca30a4a920389.tar.gz
s3: VFS: catia: Add 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_catia.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index 1739fd77d5b..5bb55cf89f6 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -2404,6 +2404,47 @@ static NTSTATUS catia_create_dfs_pathat(struct vfs_handle_struct *handle,
return status;
}
+static NTSTATUS catia_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 *mapped_name = NULL;
+ const char *path = smb_fname->base_name;
+ struct smb_filename *mapped_smb_fname = NULL;
+ NTSTATUS status;
+
+ status = catia_string_replace_allocate(handle->conn,
+ path,
+ &mapped_name,
+ vfs_translate_to_unix);
+ if (!NT_STATUS_IS_OK(status)) {
+ errno = map_errno_from_nt_status(status);
+ return status;
+ }
+ mapped_smb_fname = synthetic_smb_fname(talloc_tos(),
+ mapped_name,
+ NULL,
+ &smb_fname->st,
+ smb_fname->flags);
+ if (mapped_smb_fname == NULL) {
+ TALLOC_FREE(mapped_name);
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ status = SMB_VFS_NEXT_READ_DFS_PATHAT(handle,
+ mem_ctx,
+ dirfsp,
+ mapped_smb_fname,
+ ppreflist,
+ preferral_count);
+ TALLOC_FREE(mapped_name);
+ TALLOC_FREE(mapped_smb_fname);
+ return status;
+}
+
static struct vfs_fn_pointers vfs_catia_fns = {
.connect_fn = catia_connect,
@@ -2455,6 +2496,7 @@ static struct vfs_fn_pointers vfs_catia_fns = {
.get_compression_fn = catia_get_compression,
.set_compression_fn = catia_set_compression,
.create_dfs_pathat_fn = catia_create_dfs_pathat,
+ .read_dfs_pathat_fn = catia_read_dfs_pathat,
/* NT ACL operations. */
.get_nt_acl_fn = catia_get_nt_acl,