From: Jeremy Allison Date: Wed, 18 Feb 2015 19:49:27 +0000 (-0800) Subject: s3: smbd: leases - losen paranoia check. Stat opens can grant leases. X-Git-Tag: samba-4.2.0rc5~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6eadda106e9ba7de535575bb2a0c874d0345f347;p=thirdparty%2Fsamba.git s3: smbd: leases - losen paranoia check. Stat opens can grant leases. https://bugzilla.samba.org/show_bug.cgi?id=11102 Signed-off-by: Jeremy Allison Reviewed-by: Ralph Böhme (cherry picked from commit cec2a38e971ac83260f3a9a5c4ac7095f8d23d65) --- diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 1ad601abcdb..f8a5a8f03c2 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",