From: Volker Lendecke Date: Thu, 13 Sep 2018 16:56:54 +0000 (+0200) Subject: smbd: Add a paranoia check for leases X-Git-Tag: tdb-1.3.17~1628 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=551f85464bbd6275a1d645a06089f4c7db55b866;p=thirdparty%2Fsamba.git smbd: Add a paranoia check for leases Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index 2faad788d46..827dbeb4ef2 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -347,6 +347,12 @@ static void lease_timeout_handler(struct tevent_context *ctx, return; } + /* + * Paranoia check: There can only be one fsp_lease per lease + * key + */ + SMB_ASSERT(fsp->lease == lease); + lck = get_existing_share_mode_lock( talloc_tos(), fsp->file_id); if (lck == NULL) {