uint32_t server_max_xmit = 0;
uint32_t max_xmit;
uint32_t server_max_mux = 0;
+ uint16_t server_security_mode = 0;
enum protocol_types protocol;
status = cli_smb_recv(subreq, state, &inbuf, 1, &wct, &vwv,
}
/* NT protocol */
- cli->sec_mode = CVAL(vwv + 1, 0);
+ server_security_mode = CVAL(vwv + 1, 0);
server_max_mux = SVAL(vwv + 1, 1);
server_max_xmit = IVAL(vwv + 3, 1);
cli->sesskey = IVAL(vwv + 7, 1);
}
server_signing = "not supported";
- if (cli->sec_mode & NEGOTIATE_SECURITY_SIGNATURES_ENABLED) {
+ if (server_security_mode & NEGOTIATE_SECURITY_SIGNATURES_ENABLED) {
server_signing = "supported";
server_allowed = true;
}
- if (cli->sec_mode & NEGOTIATE_SECURITY_SIGNATURES_REQUIRED) {
+ if (server_security_mode & NEGOTIATE_SECURITY_SIGNATURES_REQUIRED) {
server_signing = "required";
server_mandatory = true;
}
return;
}
- cli->sec_mode = SVAL(vwv + 1, 0);
+ server_security_mode = SVAL(vwv + 1, 0);
server_max_xmit = SVAL(vwv + 2, 0);
server_max_mux = SVAL(vwv + 3, 0);
cli->sesskey = IVAL(vwv + 6, 0);
cli->secblob = data_blob(bytes, num_bytes);
} else {
/* the old core protocol */
- cli->sec_mode = 0;
cli->serverzone = get_time_zone(time(NULL));
server_max_xmit = 1024;
server_max_mux = 1;
+ server_security_mode = 0;
}
if (server_max_xmit < 1024) {
cli->conn.smb1.server.max_mux = server_max_mux;
+ cli->conn.smb1.server.security_mode = server_security_mode;
+
tevent_req_done(req);
}