Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
extern fstring remote_proto;
extern fstring remote_proto;
-static void get_challenge(struct smbd_server_connection *sconn, uint8 buff[8])
+static void get_challenge(struct smbXsrv_connection *xconn, uint8 buff[8])
- struct smbXsrv_connection *xconn = sconn->conn;
NTSTATUS nt_status;
/* We might be called more than once, multiple negprots are
NTSTATUS nt_status;
/* We might be called more than once, multiple negprots are
{
int secword=0;
time_t t = time(NULL);
{
int secword=0;
time_t t = time(NULL);
- struct smbd_server_connection *sconn = req->sconn;
- struct smbXsrv_connection *xconn = sconn->conn;
+ struct smbXsrv_connection *xconn = req->xconn;
uint16_t raw;
if (lp_async_smb_echo_handler()) {
raw = 0;
uint16_t raw;
if (lp_async_smb_echo_handler()) {
raw = 0;
SSVAL(req->outbuf,smb_vwv1,secword);
/* Create a token value and add it to the outgoing packet. */
if (xconn->smb1.negprot.encrypted_passwords) {
SSVAL(req->outbuf,smb_vwv1,secword);
/* Create a token value and add it to the outgoing packet. */
if (xconn->smb1.negprot.encrypted_passwords) {
- get_challenge(sconn, (uint8 *)smb_buf(req->outbuf));
+ get_challenge(xconn, (uint8 *)smb_buf(req->outbuf));
SSVAL(req->outbuf,smb_vwv11, 8);
}
SSVAL(req->outbuf,smb_vwv11, 8);
}
- smbXsrv_connection_init_tables(req->sconn->conn, PROTOCOL_LANMAN1);
+ smbXsrv_connection_init_tables(xconn, PROTOCOL_LANMAN1);
/* Reply, SMBlockread, SMBwritelock supported. */
SCVAL(req->outbuf,smb_flg, FLAG_REPLY|FLAG_SUPPORT_LOCKREAD);
/* Reply, SMBlockread, SMBwritelock supported. */
SCVAL(req->outbuf,smb_flg, FLAG_REPLY|FLAG_SUPPORT_LOCKREAD);
{
int secword=0;
time_t t = time(NULL);
{
int secword=0;
time_t t = time(NULL);
- struct smbd_server_connection *sconn = req->sconn;
- struct smbXsrv_connection *xconn = sconn->conn;
+ struct smbXsrv_connection *xconn = req->xconn;
uint16_t raw;
if (lp_async_smb_echo_handler()) {
raw = 0;
uint16_t raw;
if (lp_async_smb_echo_handler()) {
raw = 0;
/* Create a token value and add it to the outgoing packet. */
if (xconn->smb1.negprot.encrypted_passwords) {
/* Create a token value and add it to the outgoing packet. */
if (xconn->smb1.negprot.encrypted_passwords) {
- get_challenge(sconn, (uint8 *)smb_buf(req->outbuf));
+ get_challenge(xconn, (uint8 *)smb_buf(req->outbuf));
SSVAL(req->outbuf,smb_vwv11, 8);
}
SSVAL(req->outbuf,smb_vwv11, 8);
}
- smbXsrv_connection_init_tables(req->sconn->conn, PROTOCOL_LANMAN2);
+ smbXsrv_connection_init_tables(xconn, PROTOCOL_LANMAN2);
/* Reply, SMBlockread, SMBwritelock supported. */
SCVAL(req->outbuf,smb_flg,FLAG_REPLY|FLAG_SUPPORT_LOCKREAD);
/* Reply, SMBlockread, SMBwritelock supported. */
SCVAL(req->outbuf,smb_flg,FLAG_REPLY|FLAG_SUPPORT_LOCKREAD);
bool negotiate_spnego = False;
struct timespec ts;
ssize_t ret;
bool negotiate_spnego = False;
struct timespec ts;
ssize_t ret;
- struct smbd_server_connection *sconn = req->sconn;
struct smbXsrv_connection *xconn = req->xconn;
bool signing_desired = false;
bool signing_required = false;
struct smbXsrv_connection *xconn = req->xconn;
bool signing_desired = false;
bool signing_required = false;
uint8 chal[8];
/* note that we do not send a challenge at all if
we are using plaintext */
uint8 chal[8];
/* note that we do not send a challenge at all if
we are using plaintext */
- get_challenge(sconn, chal);
+ get_challenge(xconn, chal);
ret = message_push_blob(
&req->outbuf, data_blob_const(chal, sizeof(chal)));
if (ret == -1) {
ret = message_push_blob(
&req->outbuf, data_blob_const(chal, sizeof(chal)));
if (ret == -1) {
char **cliprotos;
int i;
size_t converted_size;
char **cliprotos;
int i;
size_t converted_size;
- struct smbd_server_connection *sconn = req->sconn;
- struct smbXsrv_connection *xconn = sconn->conn;
+ struct smbXsrv_connection *xconn = req->xconn;
+ struct smbd_server_connection *sconn = xconn->sconn;
START_PROFILE(SMBnegprot);
START_PROFILE(SMBnegprot);