s3: Fix bug 8334, do not fork the echo handler for smb2
authorVolker Lendecke <vl@samba.org>
Wed, 31 Aug 2011 13:06:35 +0000 (15:06 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 11 Oct 2011 13:21:05 +0000 (15:21 +0200)
commit1b9f3f6ae1f05599a88f7b7ab92f243398314b69
treeb568ce07ab577e793cb60a82d019afbd70ab3697
parent9bb2e0af6c6842ca31a2e8e1c40188342f336a26
s3: Fix bug 8334, do not fork the echo handler for smb2

If a smb1 negprot negotiated smb2 we forked the echo responder. This will
eventually lead to a panic from

[2011/08/30 10:33:29.212578,  0, pid=3846917] smbd/smb2_server.c:243(smbd_smb2_request_create)
  Invalid SMB packet: first request: 0x0009

because from the echo responder we always read using the normal smb1 protocol
handling routine. If that is a bit down the smb2 stream, we get a non-negprot
packet and panic.

BTW, the echo responder is not required for smb2 anyway, Microsoft confirmed
that it probes the server liveness using TCP keepalives and not smb2 echo
requests.
source3/smbd/negprot.c