s3: smbd: leases - losen paranoia check. Stat opens can grant leases.
authorJeremy Allison <jra@samba.org>
Wed, 18 Feb 2015 19:49:27 +0000 (11:49 -0800)
committerKarolin Seeger <kseeger@samba.org>
Sun, 22 Feb 2015 13:19:07 +0000 (14:19 +0100)
https://bugzilla.samba.org/show_bug.cgi?id=11102

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
(cherry picked from commit cec2a38e971ac83260f3a9a5c4ac7095f8d23d65)

source3/smbd/files.c

index 1ad601abcdbf158d589c010f95da183f8cb634d5..f8a5a8f03c23d22b76a71f54c16897f85a0efc5e 100644 (file)
@@ -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",