1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

s3:smb2_create: allow durable handles with SMB2_LEASE_HANDLE

We don't support real lease yet, but this makes use of fsp_lease_type()
which converts a batch oplock into and RWH lease.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Volker Lendecke 2014-10-28 15:31:46 -07:00 committed by Jeremy Allison
parent b72fca52de
commit 81a5a9e897
2 changed files with 2 additions and 2 deletions

View File

@ -168,7 +168,7 @@ NTSTATUS vfs_default_durable_disconnect(struct files_struct *fsp,
return NT_STATUS_INVALID_PARAMETER; 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; return NT_STATUS_NOT_SUPPORTED;
} }

View File

@ -998,7 +998,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
} }
if (durable_requested && if (durable_requested &&
BATCH_OPLOCK_TYPE(result->oplock_type)) (fsp_lease_type(result) & SMB2_LEASE_HANDLE))
{ {
status = SMB_VFS_DURABLE_COOKIE(result, status = SMB_VFS_DURABLE_COOKIE(result,
op, op,