mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
smbd: Change protocol selection to not use "sconn->using_smb2"
To me this is pretty confusing, it seems to overload this struct element. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
This commit is contained in:
parent
7e621b1b53
commit
f1bb46ad4e
@ -587,7 +587,7 @@ void process_smb(struct smbXsrv_connection *xconn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WITH_SMB1SERVER)
|
#if defined(WITH_SMB1SERVER)
|
||||||
if (sconn->using_smb2) {
|
if (lp_server_max_protocol() >= PROTOCOL_SMB2_02) {
|
||||||
/* At this point we're not really using smb2,
|
/* At this point we're not really using smb2,
|
||||||
* we make the decision here.. */
|
* we make the decision here.. */
|
||||||
if (smbd_is_smb2_header(inbuf, nread)) {
|
if (smbd_is_smb2_header(inbuf, nread)) {
|
||||||
@ -605,7 +605,7 @@ void process_smb(struct smbXsrv_connection *xconn,
|
|||||||
&& CVAL(inbuf, smb_com) != 0x72) {
|
&& CVAL(inbuf, smb_com) != 0x72) {
|
||||||
/* This is a non-negprot SMB1 packet.
|
/* This is a non-negprot SMB1 packet.
|
||||||
Disable SMB2 from now on. */
|
Disable SMB2 from now on. */
|
||||||
sconn->using_smb2 = false;
|
lp_do_parameter(-1, "server max protocol", "NT1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
process_smb1(xconn, inbuf, nread, unread_bytes, seqnum, encrypted);
|
process_smb1(xconn, inbuf, nread, unread_bytes, seqnum, encrypted);
|
||||||
@ -1876,21 +1876,6 @@ void smbd_process(struct tevent_context *ev_ctx,
|
|||||||
exit_server("pthreadpool_tevent_init() failed.");
|
exit_server("pthreadpool_tevent_init() failed.");
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WITH_SMB1SERVER)
|
|
||||||
if (lp_server_max_protocol() >= PROTOCOL_SMB2_02) {
|
|
||||||
#endif
|
|
||||||
/*
|
|
||||||
* We're not making the decision here,
|
|
||||||
* we're just allowing the client
|
|
||||||
* to decide between SMB1 and SMB2
|
|
||||||
* with the first negprot
|
|
||||||
* packet.
|
|
||||||
*/
|
|
||||||
sconn->using_smb2 = true;
|
|
||||||
#if defined(WITH_SMB1SERVER)
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!interactive) {
|
if (!interactive) {
|
||||||
smbd_setup_sig_term_handler(sconn);
|
smbd_setup_sig_term_handler(sconn);
|
||||||
smbd_setup_sig_hup_handler(sconn);
|
smbd_setup_sig_hup_handler(sconn);
|
||||||
|
Loading…
Reference in New Issue
Block a user