diff options
author | Ralph Boehme <slow@samba.org> | 2020-07-02 14:45:59 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2020-08-06 12:18:21 +0000 |
commit | 37e4164781349c7a98d3bd336b9ea9411dfc2cba (patch) | |
tree | d033ec5a0966f007e06678d1183db39867ba829f | |
parent | fc4f71046908be6f7694642acb71845defc79fb6 (diff) | |
download | samba-37e4164781349c7a98d3bd336b9ea9411dfc2cba.tar.gz |
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 <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(backported from commit 3f4a865821da27efbed4f7c38ad3efbcaae77a02)
[slow@samba.org: get_lease_type() takes arg d in 4.11]
-rw-r--r-- | source3/smbd/oplock.c | 4 | ||||
-rw-r--r-- | source3/smbd/proto.h | 4 |
2 files changed, 4 insertions, 4 deletions
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); |