]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: let get_lease_type() take a non-const share_mode_entry
authorRalph Boehme <slow@samba.org>
Thu, 2 Jul 2020 12:45:59 +0000 (14:45 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 6 Aug 2020 13:32:39 +0000 (13:32 +0000)
We're going to add a call to share_entry_stale_pid(share_mode_entry) which takes
a non-const pointer (in order to eventually set e->state = true).

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14428

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 3f4a865821da27efbed4f7c38ad3efbcaae77a02)

source3/smbd/oplock.c
source3/smbd/proto.h

index c63f97aac0adfeeeb9fc99bca06c2b8491965b1d..97ab05b2ba67d5d16cf5316f90d2f7385125c57b 100644 (file)
@@ -169,7 +169,7 @@ static void downgrade_file_oplock(files_struct *fsp)
        TALLOC_FREE(fsp->oplock_timeout);
 }
 
-uint32_t get_lease_type(const struct share_mode_entry *e, struct file_id id)
+uint32_t get_lease_type(struct share_mode_entry *e, struct file_id id)
 {
        NTSTATUS status;
        uint32_t current_state;
index 60941ce6c1b294c62b14b42487c9c64f1ded22d4..ac021ad93fe1f998c7fd1f4f44a66afb9d58e21c 100644 (file)
@@ -736,7 +736,7 @@ NTSTATUS create_file_default(connection_struct *conn,
 
 /* The following definitions come from smbd/oplock.c  */
 
-uint32_t get_lease_type(const struct share_mode_entry *e, struct file_id id);
+uint32_t get_lease_type(struct share_mode_entry *e, struct file_id id);
 
 void break_kernel_oplock(struct messaging_context *msg_ctx, files_struct *fsp);
 NTSTATUS set_file_oplock(files_struct *fsp);