s3: Safely mark our sconn as smb2 if we have that protocol
commit2c678dcd6722dff74fa1016dab90071eb1bff5cd
authorVolker Lendecke <vl@samba.org>
Mon, 30 May 2011 14:30:54 +0000 (30 16:30 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 7 Jun 2011 18:02:02 +0000 (7 20:02 +0200)
tree61658db0b81f949e919d368b188b29fbf95bc735
parentf5c83b0bfd4f1a867ff4b9fb6de89372ba8634a3
s3: Safely mark our sconn as smb2 if we have that protocol

Otherwise smbd will crash at an unclean exit. Without this conn_close_all will
do a close_cnum() on all connection_struct's. In smb2, those are talloc
children of the smbd_smb2_tcon's. sconn is talloc_free'ed after the
conn_close_all, but the smbd_smb2_tcon destructor will still reference
tcon->compat_conn, referencing then free'ed (and null'ed out) memory.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon May 30 22:49:53 CEST 2011 on sn-devel-104
(cherry picked from commit c981d4fa1269569a1c2db4bf72a67a357aacd69f)

Fix bug #8199 (potential crash in smbd handling smb2).
(cherry picked from commit 43610924c0052d8ea2defb54493677607a06332a)
source3/smbd/smb2_negprot.c