From cec2a38e971ac83260f3a9a5c4ac7095f8d23d65 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 18 Feb 2015 11:49:27 -0800 Subject: [PATCH] s3: smbd: leases - losen paranoia check. Stat opens can grant leases. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://bugzilla.samba.org/show_bug.cgi?id=11102 Signed-off-by: Jeremy Allison Reviewed-by: Ralph Böhme --- source3/smbd/files.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 19896a789db..5b3741bb865 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -322,7 +322,8 @@ files_struct *file_find_dif(struct smbd_server_connection *sconn, } /* Paranoia check. */ if ((fsp->fh->fd == -1) && - (fsp->oplock_type != NO_OPLOCK)) { + (fsp->oplock_type != NO_OPLOCK && + fsp->oplock_type != LEASE_OPLOCK)) { DEBUG(0,("file_find_dif: file %s file_id = " "%s, gen = %u oplock_type = %u is a " "stat open with oplock type !\n",