#define smbd_smb2_request_done(req, body, dyn) \
smbd_smb2_request_done_ex(req, NT_STATUS_OK, body, dyn, __location__)
-NTSTATUS smbd_smb2_send_oplock_break(struct smbXsrv_connection *xconn,
+NTSTATUS smbd_smb2_send_oplock_break(struct smbXsrv_client *client,
struct smbXsrv_session *session,
struct smbXsrv_tcon *tcon,
struct smbXsrv_open *op,
uint8_t oplock_level);
-NTSTATUS smbd_smb2_send_lease_break(struct smbXsrv_connection *xconn,
+NTSTATUS smbd_smb2_send_lease_break(struct smbXsrv_client *client,
uint16_t new_epoch,
uint32_t lease_flags,
struct smb2_lease_key *lease_key,
struct smbXsrv_connection *xconn = state->xconn;
NTSTATUS status;
- status = smbd_smb2_send_lease_break(xconn,
+ status = smbd_smb2_send_lease_break(NULL, //xconn,
state->new_epoch,
state->break_flags,
&state->lease_key,
uint32_t break_to)
{
NTSTATUS status;
- struct smbXsrv_connection *xconn = NULL;
+ struct smbXsrv_client *client = NULL;
struct smbXsrv_session *session = NULL;
struct timeval tv = timeval_current();
NTTIME now = timeval_to_nttime(&tv);
* to find the correct connection for a break message.
* Then we also need some retries if a channel gets disconnected.
*/
- xconn = fsp->conn->sconn->client->connections;
+ client = fsp->conn->sconn->client;
- status = smb2srv_session_lookup_conn(xconn,
+ status = smb2srv_session_lookup_conn(client->connections,
fsp->vuid,
now,
&session);
new_epoch = 0;
}
- status = smbd_smb2_send_lease_break(xconn, new_epoch, break_flags,
+ status = smbd_smb2_send_lease_break(client, new_epoch, break_flags,
&fsp->lease->lease.lease_key,
break_from, break_to);
} else {
uint8_t smb2_oplock_level;
smb2_oplock_level = (break_to & SMB2_LEASE_READ) ?
SMB2_OPLOCK_LEVEL_II : SMB2_OPLOCK_LEVEL_NONE;
- status = smbd_smb2_send_oplock_break(xconn,
+ status = smbd_smb2_send_oplock_break(client,
session,
fsp->conn->tcon,
fsp->op,
smb2_oplock_level);
}
if (!NT_STATUS_IS_OK(status)) {
- smbd_server_connection_terminate(xconn,
+ smbd_server_connection_terminate(client->connections,
nt_errstr(status));
return;
}
TALLOC_FREE(state);
}
-NTSTATUS smbd_smb2_send_oplock_break(struct smbXsrv_connection *xconn,
+NTSTATUS smbd_smb2_send_oplock_break(struct smbXsrv_client *client,
struct smbXsrv_session *session,
struct smbXsrv_tcon *tcon,
struct smbXsrv_open *op,
SBVAL(body, 0x08, op->global->open_persistent_id);
SBVAL(body, 0x10, op->global->open_volatile_id);
- return smbd_smb2_send_break(xconn, NULL, NULL, body, sizeof(body));
+ return smbd_smb2_send_break(client, NULL, NULL, body, sizeof(body));
}
-NTSTATUS smbd_smb2_send_lease_break(struct smbXsrv_connection *xconn,
+NTSTATUS smbd_smb2_send_lease_break(struct smbXsrv_client *client,
uint16_t new_epoch,
uint32_t lease_flags,
struct smb2_lease_key *lease_key,
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));
+ return smbd_smb2_send_break(client, NULL, NULL, body, sizeof(body));
}
static bool is_smb2_recvfile_write(struct smbd_smb2_request_read_state *state)