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.11.12~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37e4164781349c7a98d3bd336b9ea9411dfc2cba;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 (backported from commit 3f4a865821da27efbed4f7c38ad3efbcaae77a02) [slow@samba.org: get_lease_type() takes arg d in 4.11] --- diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index 16484bb3d9d..83539693b9c 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -172,8 +172,8 @@ static void downgrade_file_oplock(files_struct *fsp) TALLOC_FREE(fsp->oplock_timeout); } -uint32_t get_lease_type(const struct share_mode_data *d, - const struct share_mode_entry *e) +uint32_t get_lease_type(struct share_mode_data *d, + struct share_mode_entry *e) { NTSTATUS status; uint32_t current_state; diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 6e2509e7c57..82be9b4e364 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -720,8 +720,8 @@ NTSTATUS create_file_default(connection_struct *conn, /* The following definitions come from smbd/oplock.c */ -uint32_t get_lease_type(const struct share_mode_data *d, - const struct share_mode_entry *e); +uint32_t get_lease_type(struct share_mode_data *d, + struct share_mode_entry *e); void break_kernel_oplock(struct messaging_context *msg_ctx, files_struct *fsp); NTSTATUS set_file_oplock(files_struct *fsp);