diff options
author | Jeremy Allison <jra@samba.org> | 2020-05-29 16:32:12 -0700 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2020-06-03 04:54:38 +0000 |
commit | 65b8c0cfbe81cc8ca587ef92c5b951a3c147d542 (patch) | |
tree | fc7532e60f8da402eb6dcf419ef33c5cfa40ef90 | |
parent | 2a4705129d06b91023bc3fc435fccf91d3939553 (diff) | |
download | samba-65b8c0cfbe81cc8ca587ef92c5b951a3c147d542.tar.gz |
s3: VFS: Change the function signature for SMB_VFS_READ_DFS_PATHAT() to take a non-const smb_filename.
Otherwise there's no good way to return proper stat(2) information
for a DFS link without making assumptions it's a symlink store.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14391
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
-rw-r--r-- | examples/VFS/skel_opaque.c | 2 | ||||
-rw-r--r-- | examples/VFS/skel_transparent.c | 2 | ||||
-rw-r--r-- | source3/include/vfs.h | 9 | ||||
-rw-r--r-- | source3/modules/vfs_cap.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_catia.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_ceph.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_default.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_full_audit.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_glusterfs.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_not_implemented.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_shadow_copy2.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_time_audit.c | 2 | ||||
-rw-r--r-- | source3/smbd/vfs.c | 2 |
13 files changed, 18 insertions, 15 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index 1a9b472634d..0a6ca4d9200 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -115,7 +115,7 @@ static NTSTATUS skel_create_dfs_pathat(struct vfs_handle_struct *handle, static NTSTATUS skel_read_dfs_pathat(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *dirfsp, - const struct smb_filename *smb_fname, + struct smb_filename *smb_fname, struct referral **ppreflist, size_t *preferral_count) { diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index fdb6d0d5f54..677af2217bf 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -116,7 +116,7 @@ static NTSTATUS skel_create_dfs_pathat(struct vfs_handle_struct *handle, static NTSTATUS skel_read_dfs_pathat(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *dirfsp, - const struct smb_filename *smb_fname, + struct smb_filename *smb_fname, struct referral **ppreflist, size_t *preferral_count) { diff --git a/source3/include/vfs.h b/source3/include/vfs.h index ab4098636dc..d527f850628 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -324,6 +324,9 @@ * Version 43 - Add dirfsp args to SMB_VFS_CREATE_FILE() * Version 43 - Add SMB_VFS_OPENAT() * Version 43 - Remove SMB_VFS_OPEN() + * Version 43 - SMB_VFS_READ_DFS_PATHAT() should take a non-const name. + There's no easy way to return stat info for a DFS link + otherwise. */ #define SMB_VFS_INTERFACE_VERSION 43 @@ -741,7 +744,7 @@ struct vfs_fn_pointers { NTSTATUS (*read_dfs_pathat_fn)(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *dirfsp, - const struct smb_filename *smb_fname, + struct smb_filename *smb_fname, struct referral **ppreflist, size_t *preferral_count); @@ -1255,7 +1258,7 @@ NTSTATUS smb_vfs_call_create_dfs_pathat(struct vfs_handle_struct *handle, NTSTATUS smb_vfs_call_read_dfs_pathat(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *dirfsp, - const struct smb_filename *smb_fname, + struct smb_filename *smb_fname, struct referral **ppreflist, size_t *preferral_count); DIR *smb_vfs_call_fdopendir(struct vfs_handle_struct *handle, @@ -1705,7 +1708,7 @@ NTSTATUS vfs_not_implemented_create_dfs_pathat(struct vfs_handle_struct *handle, NTSTATUS vfs_not_implemented_read_dfs_pathat(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *dirfsp, - const struct smb_filename *smb_fname, + struct smb_filename *smb_fname, struct referral **ppreflist, size_t *preferral_count); NTSTATUS vfs_not_implemented_snap_check_path(struct vfs_handle_struct *handle, diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c index 17ebb786822..cf1c1f3d22c 100644 --- a/source3/modules/vfs_cap.c +++ b/source3/modules/vfs_cap.c @@ -1042,7 +1042,7 @@ static NTSTATUS cap_create_dfs_pathat(vfs_handle_struct *handle, 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 smb_filename *smb_fname, struct referral **ppreflist, size_t *preferral_count) { diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c index 6fc14de076b..0ce2f7925a3 100644 --- a/source3/modules/vfs_catia.c +++ b/source3/modules/vfs_catia.c @@ -2417,7 +2417,7 @@ static NTSTATUS catia_create_dfs_pathat(struct vfs_handle_struct *handle, 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 smb_filename *smb_fname, struct referral **ppreflist, size_t *preferral_count) { diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c index 767a2ad8609..7bc6ba50cd6 100644 --- a/source3/modules/vfs_ceph.c +++ b/source3/modules/vfs_ceph.c @@ -1340,7 +1340,7 @@ static NTSTATUS cephwrap_create_dfs_pathat(struct vfs_handle_struct *handle, static NTSTATUS cephwrap_read_dfs_pathat(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *dirfsp, - const struct smb_filename *smb_fname, + struct smb_filename *smb_fname, struct referral **ppreflist, size_t *preferral_count) { diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 5047582ce46..f00255914f3 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -420,7 +420,7 @@ static NTSTATUS vfswrap_create_dfs_pathat(struct vfs_handle_struct *handle, static NTSTATUS vfswrap_read_dfs_pathat(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *dirfsp, - const struct smb_filename *smb_fname, + struct smb_filename *smb_fname, struct referral **ppreflist, size_t *preferral_count) { diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c index 3e10a8c4127..9d89bfd396a 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -921,7 +921,7 @@ static NTSTATUS smb_full_audit_create_dfs_pathat(struct vfs_handle_struct *handl static NTSTATUS smb_full_audit_read_dfs_pathat(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *dirfsp, - const struct smb_filename *smb_fname, + struct smb_filename *smb_fname, struct referral **ppreflist, size_t *preferral_count) { diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c index 843cf5be78f..658e4635eef 100644 --- a/source3/modules/vfs_glusterfs.c +++ b/source3/modules/vfs_glusterfs.c @@ -1941,7 +1941,7 @@ static NTSTATUS vfs_gluster_create_dfs_pathat(struct vfs_handle_struct *handle, static NTSTATUS vfs_gluster_read_dfs_pathat(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *dirfsp, - const struct smb_filename *smb_fname, + struct smb_filename *smb_fname, struct referral **ppreflist, size_t *preferral_count) { diff --git a/source3/modules/vfs_not_implemented.c b/source3/modules/vfs_not_implemented.c index ca12406ac07..529ad579f49 100644 --- a/source3/modules/vfs_not_implemented.c +++ b/source3/modules/vfs_not_implemented.c @@ -109,7 +109,7 @@ NTSTATUS vfs_not_implemented_create_dfs_pathat(struct vfs_handle_struct *handle, NTSTATUS vfs_not_implemented_read_dfs_pathat(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *dirfsp, - const struct smb_filename *smb_fname, + struct smb_filename *smb_fname, struct referral **ppreflist, size_t *preferral_count) { diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index 4eb8257f1fc..45fb5b97ce3 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -2394,7 +2394,7 @@ static NTSTATUS shadow_copy2_create_dfs_pathat(struct vfs_handle_struct *handle, static NTSTATUS shadow_copy2_read_dfs_pathat(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *dirfsp, - const struct smb_filename *smb_fname, + struct smb_filename *smb_fname, struct referral **ppreflist, size_t *preferral_count) { diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c index ff4952c45e7..f70ff73fec1 100644 --- a/source3/modules/vfs_time_audit.c +++ b/source3/modules/vfs_time_audit.c @@ -352,7 +352,7 @@ static NTSTATUS smb_time_audit_create_dfs_pathat(struct vfs_handle_struct *handl static NTSTATUS smb_time_audit_read_dfs_pathat(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *dirfsp, - const struct smb_filename *smb_fname, + struct smb_filename *smb_fname, struct referral **ppreflist, size_t *preferral_count) { diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 849ee6f6523..85b23d35ba6 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -1677,7 +1677,7 @@ NTSTATUS smb_vfs_call_create_dfs_pathat(struct vfs_handle_struct *handle, NTSTATUS smb_vfs_call_read_dfs_pathat(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct files_struct *dirfsp, - const struct smb_filename *smb_fname, + struct smb_filename *smb_fname, struct referral **ppreflist, size_t *preferral_count) { |