s3: Do not fork the echo handler for smb2
commita545f7540f58cf277cf2ba97254908f827803462
authorVolker Lendecke <vl@samba.org>
Wed, 31 Aug 2011 13:06:35 +0000 (31 15:06 +0200)
committerKarolin Seeger <kseeger@samba.org>
Fri, 16 Sep 2011 18:43:24 +0000 (16 20:43 +0200)
tree90697d556920deeb5635b39b5758d168d311997f
parent339b1819bf232b440ce91147bbb6821cf8f200c6
s3: 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.

The last 2 patches address bug #8334 (smb2: smbd logs Invalid SMB packet: first
request: 0x0008 and crashes).
(cherry picked from commit d72878365e3ab0ef7bc31065261d744d7693d578)
source3/smbd/negprot.c