bool smbd_smb2_is_compound(const struct smbd_smb2_request *req);
NTSTATUS smbd_add_connection(struct smbXsrv_client *client, int sock_fd,
- struct smbXsrv_connection **_xconn);
+ NTTIME now, struct smbXsrv_connection **_xconn);
NTSTATUS reply_smb2002(struct smb_request *req, uint16_t choice);
NTSTATUS reply_smb20ff(struct smb_request *req, uint16_t choice);
struct smbXsrv_client *client;
+ NTTIME connect_time;
const struct tsocket_address *local_address;
const struct tsocket_address *remote_address;
const char *remote_hostname;
}
NTSTATUS smbd_add_connection(struct smbXsrv_client *client, int sock_fd,
- struct smbXsrv_connection **_xconn)
+ NTTIME now, struct smbXsrv_connection **_xconn)
{
TALLOC_CTX *frame = talloc_stackframe();
struct smbXsrv_connection *xconn;
return NT_STATUS_NO_MEMORY;
}
talloc_steal(frame, xconn);
+ xconn->connect_time = now;
xconn->transport.sock = sock_fd;
smbd_echo_init(xconn);
smbd_setup_sig_hup_handler(sconn);
}
- status = smbd_add_connection(client, sock_fd, &xconn);
+ status = smbd_add_connection(client, sock_fd, now, &xconn);
if (NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_ACCESS_DENIED)) {
/*
* send a negative session response "not listening on calling
DBG_ERR("got connection sockfd[%d]\n", sock_fd);
NDR_PRINT_DEBUG(smbXsrv_connection_passB, &pass_blob);
- status = smbd_add_connection(client, sock_fd, &xconn);
+ status = smbd_add_connection(client,
+ sock_fd,
+ pass_info0->initial_connect_time,
+ &xconn);
if (!NT_STATUS_IS_OK(status)) {
close(sock_fd);
sock_fd = -1;