From: Ralph Boehme Date: Tue, 13 Oct 2020 13:19:30 +0000 (+0200) Subject: vfs: make dirfsp arg to SMB_VFS_READLINKAT() const X-Git-Tag: talloc-2.3.2~150 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4cbe0610cfa275581332c156963301e8c6d013b;p=thirdparty%2Fsamba.git vfs: make dirfsp arg to SMB_VFS_READLINKAT() const Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index 90ee82ab258..2a3a7301bdb 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -474,7 +474,7 @@ static int skel_symlinkat(vfs_handle_struct *handle, } static int skel_vfs_readlinkat(vfs_handle_struct *handle, - files_struct *dirfsp, + const struct files_struct *dirfsp, const struct smb_filename *smb_fname, char *buf, size_t bufsiz) diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index d48ac47443b..a86b3e7cd19 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -600,7 +600,7 @@ static int skel_symlinkat(vfs_handle_struct *handle, } static int skel_vfs_readlinkat(vfs_handle_struct *handle, - files_struct *dirfsp, + const struct files_struct *dirfsp, const struct smb_filename *smb_fname, char *buf, size_t bufsiz) diff --git a/source3/include/vfs.h b/source3/include/vfs.h index b282e2a361b..22c139607e2 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -330,6 +330,7 @@ * Change to Version 44 - will ship with 4.14. * Version 44 - Remove dirfsp arg from struct files_struct * Version 44 - Remove dirfsp arg to SMB_VFS_CREATE_FILE() + * Version 44 - Make dirfsp arg to SMB_VFS_READLINKAT() const */ #define SMB_VFS_INTERFACE_VERSION 44 @@ -863,7 +864,7 @@ struct vfs_fn_pointers { struct files_struct *dirfsp, const struct smb_filename *new_smb_fname); int (*readlinkat_fn)(struct vfs_handle_struct *handle, - struct files_struct *dirfsp, + const struct files_struct *dirfsp, const struct smb_filename *smb_fname, char *buf, size_t bufsiz); @@ -1407,7 +1408,7 @@ int smb_vfs_call_symlinkat(struct vfs_handle_struct *handle, struct files_struct *dirfsp, const struct smb_filename *new_smb_fname); int smb_vfs_call_readlinkat(struct vfs_handle_struct *handle, - struct files_struct *dirfsp, + const struct files_struct *dirfsp, const struct smb_filename *smb_fname, char *buf, size_t bufsiz); @@ -1853,7 +1854,7 @@ int vfs_not_implemented_symlinkat(vfs_handle_struct *handle, struct files_struct *dirfsp, const struct smb_filename *new_smb_fname); int vfs_not_implemented_vfs_readlinkat(vfs_handle_struct *handle, - struct files_struct *dirfsp, + const struct files_struct *dirfsp, const struct smb_filename *smb_fname, char *buf, size_t bufsiz); diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c index 93f0454c608..5deb7754f02 100644 --- a/source3/modules/vfs_cap.c +++ b/source3/modules/vfs_cap.c @@ -519,7 +519,7 @@ static int cap_symlinkat(vfs_handle_struct *handle, } static int cap_readlinkat(vfs_handle_struct *handle, - files_struct *dirfsp, + const struct files_struct *dirfsp, const struct smb_filename *smb_fname, char *buf, size_t bufsiz) diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c index a87d162e573..546502eb88f 100644 --- a/source3/modules/vfs_ceph.c +++ b/source3/modules/vfs_ceph.c @@ -1051,7 +1051,7 @@ static int cephwrap_symlinkat(struct vfs_handle_struct *handle, } static int cephwrap_readlinkat(struct vfs_handle_struct *handle, - files_struct *dirfsp, + const struct files_struct *dirfsp, const struct smb_filename *smb_fname, char *buf, size_t bufsiz) diff --git a/source3/modules/vfs_ceph_snapshots.c b/source3/modules/vfs_ceph_snapshots.c index 9ff5b9de074..80dfb48c201 100644 --- a/source3/modules/vfs_ceph_snapshots.c +++ b/source3/modules/vfs_ceph_snapshots.c @@ -1023,7 +1023,7 @@ static int ceph_snap_gmt_ntimes(vfs_handle_struct *handle, } static int ceph_snap_gmt_readlinkat(vfs_handle_struct *handle, - files_struct *dirfsp, + const struct files_struct *dirfsp, const struct smb_filename *csmb_fname, char *buf, size_t bufsiz) diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 49e92ffea55..904ee942c2a 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -2883,7 +2883,7 @@ static int vfswrap_symlinkat(vfs_handle_struct *handle, } static int vfswrap_readlinkat(vfs_handle_struct *handle, - files_struct *dirfsp, + const struct files_struct *dirfsp, const struct smb_filename *smb_fname, char *buf, size_t bufsiz) diff --git a/source3/modules/vfs_expand_msdfs.c b/source3/modules/vfs_expand_msdfs.c index 6845b81b0cb..7deeb2b7374 100644 --- a/source3/modules/vfs_expand_msdfs.c +++ b/source3/modules/vfs_expand_msdfs.c @@ -183,7 +183,7 @@ static char *expand_msdfs_target(TALLOC_CTX *ctx, } static int expand_msdfs_readlinkat(struct vfs_handle_struct *handle, - files_struct *dirfsp, + const struct files_struct *dirfsp, const struct smb_filename *smb_fname, char *buf, size_t bufsiz) diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c index 5fceac6cf1f..f1823e3b22e 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -1813,7 +1813,7 @@ static int smb_full_audit_symlinkat(vfs_handle_struct *handle, } static int smb_full_audit_readlinkat(vfs_handle_struct *handle, - files_struct *dirfsp, + const struct files_struct *dirfsp, const struct smb_filename *smb_fname, char *buf, size_t bufsiz) diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c index bf7244ea3a5..ca8b54829cd 100644 --- a/source3/modules/vfs_glusterfs.c +++ b/source3/modules/vfs_glusterfs.c @@ -1703,7 +1703,7 @@ static int vfs_gluster_symlinkat(struct vfs_handle_struct *handle, } static int vfs_gluster_readlinkat(struct vfs_handle_struct *handle, - files_struct *dirfsp, + const struct files_struct *dirfsp, const struct smb_filename *smb_fname, char *buf, size_t bufsiz) diff --git a/source3/modules/vfs_media_harmony.c b/source3/modules/vfs_media_harmony.c index e3ce2804b5f..12e7ad61806 100644 --- a/source3/modules/vfs_media_harmony.c +++ b/source3/modules/vfs_media_harmony.c @@ -1643,7 +1643,7 @@ out: * Failure: set errno, return -1 */ static int mh_readlinkat(vfs_handle_struct *handle, - files_struct *dirfsp, + const struct files_struct *dirfsp, const struct smb_filename *smb_fname, char *buf, size_t bufsiz) diff --git a/source3/modules/vfs_not_implemented.c b/source3/modules/vfs_not_implemented.c index 9b5b0f6b4f6..59aaddb163a 100644 --- a/source3/modules/vfs_not_implemented.c +++ b/source3/modules/vfs_not_implemented.c @@ -472,7 +472,7 @@ int vfs_not_implemented_symlinkat(vfs_handle_struct *handle, } int vfs_not_implemented_vfs_readlinkat(vfs_handle_struct *handle, - files_struct *dirfsp, + const struct files_struct *dirfsp, const struct smb_filename *smb_fname, char *buf, size_t bufsiz) diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index 0780895b0dd..e5413b75128 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -1568,7 +1568,7 @@ static int shadow_copy2_ntimes(vfs_handle_struct *handle, } static int shadow_copy2_readlinkat(vfs_handle_struct *handle, - files_struct *dirfsp, + const struct files_struct *dirfsp, const struct smb_filename *smb_fname, char *buf, size_t bufsiz) diff --git a/source3/modules/vfs_snapper.c b/source3/modules/vfs_snapper.c index 8f239c6cb3f..3663bf2d4a3 100644 --- a/source3/modules/vfs_snapper.c +++ b/source3/modules/vfs_snapper.c @@ -2237,7 +2237,7 @@ static int snapper_gmt_ntimes(vfs_handle_struct *handle, } static int snapper_gmt_readlinkat(vfs_handle_struct *handle, - files_struct *dirfsp, + const struct files_struct *dirfsp, const struct smb_filename *smb_fname, char *buf, size_t bufsiz) diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c index c6b0130bb93..7ff0b24cced 100644 --- a/source3/modules/vfs_time_audit.c +++ b/source3/modules/vfs_time_audit.c @@ -1433,7 +1433,7 @@ static int smb_time_audit_symlinkat(vfs_handle_struct *handle, } static int smb_time_audit_readlinkat(vfs_handle_struct *handle, - files_struct *dirfsp, + const struct files_struct *dirfsp, const struct smb_filename *smb_fname, char *buf, size_t bufsiz) diff --git a/source3/modules/vfs_unityed_media.c b/source3/modules/vfs_unityed_media.c index ca20dc6baeb..014420fd961 100644 --- a/source3/modules/vfs_unityed_media.c +++ b/source3/modules/vfs_unityed_media.c @@ -1284,7 +1284,7 @@ err: } static int um_readlinkat(vfs_handle_struct *handle, - files_struct *dirfsp, + const struct files_struct *dirfsp, const struct smb_filename *smb_fname, char *buf, size_t bufsiz) diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 515b8c079b4..1c8368b060c 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -2290,7 +2290,7 @@ int smb_vfs_call_symlinkat(struct vfs_handle_struct *handle, } int smb_vfs_call_readlinkat(struct vfs_handle_struct *handle, - files_struct *dirfsp, + const struct files_struct *dirfsp, const struct smb_filename *smb_fname, char *buf, size_t bufsiz)