s3: Do not fork the echo handler for smb2
authorVolker Lendecke <vl@samba.org>
Wed, 31 Aug 2011 13:06:35 +0000 (15:06 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 15 Sep 2011 18:33:16 +0000 (20:33 +0200)
commitd72878365e3ab0ef7bc31065261d744d7693d578
tree3072ce73fa4379568c2f4c3a95d2fc5ce5204817
parent4ad4665e10a77038d7f3dd8400473c8fcf3db451
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).
source3/smbd/negprot.c