s3: smbd: leases - losen paranoia check. Stat opens can grant leases.
[kamenim/samba-autobuild/.git] / source3 / smbd / files.c
index 19896a789dbcecd2c853dbc8d3c4f4bd4f12e2f0..5b3741bb8658a487da72ea76649a363b028a9e60 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",