libsmb: Use smb2 tcon if conn_protocol >= SMB2_02
authorDan Robertson <drobertson@tripwire.com>
Thu, 22 Feb 2018 20:47:11 +0000 (20:47 +0000)
committerJeremy Allison <jra@samba.org>
Thu, 1 Mar 2018 23:39:58 +0000 (00:39 +0100)
commitb67ffaf518c971817b167b41bf6226cddfdcfd2f
treedf67c70da9a3782b143514ec41a66a0dc952bd75
parent426e4a5a20cff73a80d80b46f15826deac3f934f
libsmb: Use smb2 tcon if conn_protocol >= SMB2_02

When the connection protocol is SMB2 the tid from the smb1 member is
used instead of smb2 in cli_state_set_tid which often results in a null
deref.

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

Signed-off-by: Dan Robertson <drobertson@tripwire.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/libsmb/clientgen.c