From: Volker Lendecke Date: Wed, 7 Aug 2019 20:00:11 +0000 (+0200) Subject: smbd: Make "lease" const in SMB_VFS_CREATE_FILE() X-Git-Tag: tdb-1.4.2~182 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2c20954af5d55ed3537de7d3b22340c8305ad1a3;p=thirdparty%2Fsamba.git smbd: Make "lease" const in SMB_VFS_CREATE_FILE() Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index 4b2b11a1aaa..55b576302a1 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -203,7 +203,7 @@ static NTSTATUS skel_create_file(struct vfs_handle_struct *handle, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, - struct smb2_lease *lease, + const struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index 0de01ac9d54..eae2e9d5027 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -198,7 +198,7 @@ static NTSTATUS skel_create_file(struct vfs_handle_struct *handle, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, - struct smb2_lease *lease, + const struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 268f286916c..aec9546681b 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -271,6 +271,7 @@ /* Version 41 - Remove "msg_ctx" parameter from SMB_VFS_BRL_UNLOCK_WINDOWS */ /* Bump to version 42, Samba 4.12 will ship with that */ /* Version 42 - Remove share_access member from struct files_struct */ +/* Version 42 - Make "lease" a const* in create_file_fn */ #define SMB_VFS_INTERFACE_VERSION 42 @@ -714,7 +715,7 @@ struct vfs_fn_pointers { uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, - struct smb2_lease *lease, + const struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, @@ -1211,7 +1212,7 @@ NTSTATUS smb_vfs_call_create_file(struct vfs_handle_struct *handle, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, - struct smb2_lease *lease, + const struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, @@ -1649,7 +1650,7 @@ NTSTATUS vfs_not_implemented_create_file(struct vfs_handle_struct *handle, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, - struct smb2_lease *lease, + const struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 84c22bb1517..6580a05bbd6 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -569,7 +569,7 @@ static NTSTATUS vfswrap_create_file(vfs_handle_struct *handle, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, - struct smb2_lease *lease, + const struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 8289be3b3ca..2960aed12c4 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -3939,7 +3939,7 @@ static NTSTATUS fruit_create_file(vfs_handle_struct *handle, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, - struct smb2_lease *lease, + const struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c index f6e11516970..bc644c8f8ed 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -1059,7 +1059,7 @@ static NTSTATUS smb_full_audit_create_file(vfs_handle_struct *handle, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, - struct smb2_lease *lease, + const struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, diff --git a/source3/modules/vfs_media_harmony.c b/source3/modules/vfs_media_harmony.c index ea49eff6d8f..9523c6fca57 100644 --- a/source3/modules/vfs_media_harmony.c +++ b/source3/modules/vfs_media_harmony.c @@ -1198,7 +1198,7 @@ static NTSTATUS mh_create_file(vfs_handle_struct *handle, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, - struct smb2_lease *lease, + const struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, diff --git a/source3/modules/vfs_not_implemented.c b/source3/modules/vfs_not_implemented.c index e3a39d57ca2..a29ce9c3353 100644 --- a/source3/modules/vfs_not_implemented.c +++ b/source3/modules/vfs_not_implemented.c @@ -201,7 +201,7 @@ NTSTATUS vfs_not_implemented_create_file(struct vfs_handle_struct *handle, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, - struct smb2_lease *lease, + const struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c index 2fb847b1b34..1d82ffe454f 100644 --- a/source3/modules/vfs_time_audit.c +++ b/source3/modules/vfs_time_audit.c @@ -598,7 +598,7 @@ static NTSTATUS smb_time_audit_create_file(vfs_handle_struct *handle, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, - struct smb2_lease *lease, + const struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, diff --git a/source3/modules/vfs_unityed_media.c b/source3/modules/vfs_unityed_media.c index 43285191cd2..cc531d46701 100644 --- a/source3/modules/vfs_unityed_media.c +++ b/source3/modules/vfs_unityed_media.c @@ -907,7 +907,7 @@ static NTSTATUS um_create_file(vfs_handle_struct *handle, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, - struct smb2_lease *lease, + const struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, diff --git a/source3/modules/vfs_worm.c b/source3/modules/vfs_worm.c index a956911591c..9b1a5facae7 100644 --- a/source3/modules/vfs_worm.c +++ b/source3/modules/vfs_worm.c @@ -32,7 +32,7 @@ static NTSTATUS vfs_worm_create_file(vfs_handle_struct *handle, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, - struct smb2_lease *lease, + const struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd, diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 51a4aeb0f22..b8b482e758e 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -1613,7 +1613,7 @@ NTSTATUS smb_vfs_call_create_file(struct vfs_handle_struct *handle, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, - struct smb2_lease *lease, + const struct smb2_lease *lease, uint64_t allocation_size, uint32_t private_flags, struct security_descriptor *sd,