mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
s3:smb2_server: add smbd_smb2_send_lease_break() helper function
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
a9a39953c7
commit
498e7220c5
@ -251,6 +251,12 @@ NTSTATUS smbd_smb2_send_oplock_break(struct smbXsrv_connection *xconn,
|
|||||||
struct smbXsrv_tcon *tcon,
|
struct smbXsrv_tcon *tcon,
|
||||||
struct smbXsrv_open *op,
|
struct smbXsrv_open *op,
|
||||||
uint8_t oplock_level);
|
uint8_t oplock_level);
|
||||||
|
NTSTATUS smbd_smb2_send_lease_break(struct smbXsrv_connection *xconn,
|
||||||
|
uint16_t new_epoch,
|
||||||
|
uint32_t lease_flags,
|
||||||
|
struct smb2_lease_key *lease_key,
|
||||||
|
uint32_t current_lease_state,
|
||||||
|
uint32_t new_lease_state);
|
||||||
|
|
||||||
NTSTATUS smbd_smb2_request_pending_queue(struct smbd_smb2_request *req,
|
NTSTATUS smbd_smb2_request_pending_queue(struct smbd_smb2_request *req,
|
||||||
struct tevent_req *subreq,
|
struct tevent_req *subreq,
|
||||||
|
@ -2868,6 +2868,29 @@ NTSTATUS smbd_smb2_send_oplock_break(struct smbXsrv_connection *xconn,
|
|||||||
return smbd_smb2_send_break(xconn, session, tcon, body, sizeof(body));
|
return smbd_smb2_send_break(xconn, session, tcon, body, sizeof(body));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NTSTATUS smbd_smb2_send_lease_break(struct smbXsrv_connection *xconn,
|
||||||
|
uint16_t new_epoch,
|
||||||
|
uint32_t lease_flags,
|
||||||
|
struct smb2_lease_key *lease_key,
|
||||||
|
uint32_t current_lease_state,
|
||||||
|
uint32_t new_lease_state)
|
||||||
|
{
|
||||||
|
uint8_t body[0x2c];
|
||||||
|
|
||||||
|
SSVAL(body, 0x00, sizeof(body));
|
||||||
|
SSVAL(body, 0x02, new_epoch);
|
||||||
|
SIVAL(body, 0x04, lease_flags);
|
||||||
|
SBVAL(body, 0x08, lease_key->data[0]);
|
||||||
|
SBVAL(body, 0x10, lease_key->data[1]);
|
||||||
|
SIVAL(body, 0x18, current_lease_state);
|
||||||
|
SIVAL(body, 0x1c, new_lease_state);
|
||||||
|
SIVAL(body, 0x20, 0); /* BreakReason, MUST be 0 */
|
||||||
|
SIVAL(body, 0x24, 0); /* AccessMaskHint, MUST be 0 */
|
||||||
|
SIVAL(body, 0x28, 0); /* ShareMaskHint, MUST be 0 */
|
||||||
|
|
||||||
|
return smbd_smb2_send_break(xconn, NULL, NULL, body, sizeof(body));
|
||||||
|
}
|
||||||
|
|
||||||
static bool is_smb2_recvfile_write(struct smbd_smb2_request_read_state *state)
|
static bool is_smb2_recvfile_write(struct smbd_smb2_request_read_state *state)
|
||||||
{
|
{
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
|
Loading…
Reference in New Issue
Block a user