From: Ralph Boehme Date: Thu, 2 Jul 2020 12:45:59 +0000 (+0200) Subject: smbd: let get_lease_type() take a non-const share_mode_entry X-Git-Tag: samba-4.13.0rc1~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f4a865821da27efbed4f7c38ad3efbcaae77a02;p=thirdparty%2Fsamba.git smbd: let get_lease_type() take a non-const share_mode_entry 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 Reviewed-by: Stefan Metzmacher --- diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index c63f97aac0a..97ab05b2ba6 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -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; diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index eeb6fcbf3d6..118e926b55f 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -774,7 +774,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);