smbd:smb2: fix crash when smb2 session reauth fails
authorMichael Adam <obnox@samba.org>
Thu, 19 Sep 2013 21:41:51 +0000 (23:41 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 15 Oct 2013 18:48:19 +0000 (11:48 -0700)
commit25494628a2e977568de0f634602ebe893d0a5b88
tree2d7a51238a8036bd54ab17df035498ce138dc1b3
parent9646dfcdf2ffe0fbd56284a87007b63a9ab34a30
smbd:smb2: fix crash when smb2 session reauth fails

https://bugzilla.samba.org/show_bug.cgi?id=10208

Authentication error in smb2 session reauth invalidates
the session. In this case the session must in contrast
to successful session setup requests be torn down and live
no longer than the request.

The talloc move of the session from the global session
table to the request ensures that the session setup
reply can still be correctly signed, but subsequent
requests on the connection don't find a session any more.

Pair-Programmed-With: Jeremy Allison <jra@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
source3/smbd/smb2_sesssetup.c