diff --git a/source3/smbd/durable.c b/source3/smbd/durable.c index 9489cf15d1b..c0d18832049 100644 --- a/source3/smbd/durable.c +++ b/source3/smbd/durable.c @@ -168,7 +168,7 @@ NTSTATUS vfs_default_durable_disconnect(struct files_struct *fsp, return NT_STATUS_INVALID_PARAMETER; } - if (!BATCH_OPLOCK_TYPE(fsp->oplock_type)) { + if ((fsp_lease_type(fsp) & SMB2_LEASE_HANDLE) == 0) { return NT_STATUS_NOT_SUPPORTED; } diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index 1e31cbf3510..f006a96e17f 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -998,7 +998,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx, } if (durable_requested && - BATCH_OPLOCK_TYPE(result->oplock_type)) + (fsp_lease_type(result) & SMB2_LEASE_HANDLE)) { status = SMB_VFS_DURABLE_COOKIE(result, op,