From: Volker Lendecke Date: Tue, 10 Dec 2019 17:55:39 +0000 (+0100) Subject: smbd: Explicitly state when modifying share_mode_data X-Git-Tag: ldb-2.1.0~249 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6abcc83366f5f3203e9454b444c7d0ada7fed41e;p=thirdparty%2Fsamba.git smbd: Explicitly state when modifying share_mode_data Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 6bf1feaeffd..d1c3f6badc8 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -2575,8 +2575,10 @@ grant: } } - if (granted & SMB2_LEASE_READ) { + if ((granted & SMB2_LEASE_READ) && + ((lck->data->flags & SHARE_MODE_LEASE_READ) == 0)) { lck->data->flags |= SHARE_MODE_LEASE_READ; + lck->data->modified = true; } DBG_DEBUG("oplock type 0x%x on file %s\n",