If an "RH" lease was requested and due to existing brl-lock we do not grant
an "R" lease, we end up granting an "H"-only lease which is not a valid lease
state.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15894
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
if (lp_locking(fsp->conn->params) && file_has_brlocks(fsp)) {
DBG_DEBUG("file %s has byte range locks\n",
fsp_str_dbg(fsp));
- granted &= ~SMB2_LEASE_READ;
+ granted &= ~(SMB2_LEASE_READ | SMB2_LEASE_HANDLE);
}
if (state.disallow_write_lease) {