]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: Change the function signature for SMB_VFS_READ_DFS_PATHAT() to take a non...
authorJeremy Allison <jra@samba.org>
Fri, 29 May 2020 23:32:12 +0000 (16:32 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 3 Jun 2020 04:54:38 +0000 (04:54 +0000)
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>
13 files changed:
examples/VFS/skel_opaque.c
examples/VFS/skel_transparent.c
source3/include/vfs.h
source3/modules/vfs_cap.c
source3/modules/vfs_catia.c
source3/modules/vfs_ceph.c
source3/modules/vfs_default.c
source3/modules/vfs_full_audit.c
source3/modules/vfs_glusterfs.c
source3/modules/vfs_not_implemented.c
source3/modules/vfs_shadow_copy2.c
source3/modules/vfs_time_audit.c
source3/smbd/vfs.c

index 1a9b472634db72f28cd510b5c134a7157287b3cf..0a6ca4d9200d6475dfdb0f75ee093e9b0342e68c 100644 (file)
@@ -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)
 {
index fdb6d0d5f54bee0a5473d69b5588f30707c79963..677af2217bf17cc4a28452ff8affeedce800b1a2 100644 (file)
@@ -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)
 {
index ab4098636dc7c006152c54ff173eef1b98c0ba67..d527f8506283b59f221aa98ec7d81be502703eca 100644 (file)
  * 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,
index 17ebb786822e4ffb3f5fe6b34c7667d7f7ebf52c..cf1c1f3d22c2a618fe8cc1d5d28ab3e5e2c43556 100644 (file)
@@ -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)
 {
index 6fc14de076b37ec9d57c0fb2670fbd1ba929cfdd..0ce2f7925a3bb81d063b13ee85f6a36dcad882e1 100644 (file)
@@ -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)
 {
index 767a2ad86091feda02d145afd279d6f4ea4087fc..7bc6ba50cd63760fa2136f081a50e931ffb45482 100644 (file)
@@ -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)
 {
index 5047582ce465f22f77194dc9fc5d971377d4402a..f00255914f3e654f0803e3fd9b3dda83e84db050 100644 (file)
@@ -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)
 {
index 3e10a8c4127618901fd8f18001b197fbc3535724..9d89bfd396ad4e179b29ec5326a9aa7c80fdba4c 100644 (file)
@@ -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)
 {
index 843cf5be78f01425a2c20751e49986bbff7df2bb..658e4635eef3a40e9daaf0b3f982e32957b2701c 100644 (file)
@@ -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)
 {
index ca12406ac07d89cab7025a9010079047c268eed3..529ad579f495905a5940c8be951d7b847dc8e411 100644 (file)
@@ -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)
 {
index 4eb8257f1fc1e151224069c54a7bcd81c9a65309..45fb5b97ce37994bf426220dda08ff86f2079189 100644 (file)
@@ -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)
 {
index ff4952c45e7b624762227fcc1121987a4f0f5ef3..f70ff73fec17ae232f44da89d900d3bc142b124e 100644 (file)
@@ -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)
 {
index 849ee6f6523388d993e9559de8e9b34befb1854b..85b23d35ba6c10924535b87441c18f0f717967b7 100644 (file)
@@ -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)
 {