libcli/smb: handle a talloc_free() on an unsent smb1 request
authorStefan Metzmacher <metze@samba.org>
Thu, 15 Sep 2016 09:46:33 +0000 (11:46 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 26 Oct 2016 09:20:12 +0000 (11:20 +0200)
commit00e417ffa026025e9ebb6be0d6858b574b7422c1
treeb92a7895f697f99f6b95b6bfe6def24768889648
parent4c08920b8389ddc646ac1793930fefb9f2b92cc9
libcli/smb: handle a talloc_free() on an unsent smb1 request

When a the higher level does a TALLOC_FREE() on an already
queued request, we need to check whether we already sent a byte,
if not we can try to unwind the smb1 signing sequence number,
if there was only one pending request, in all other cases
we need to disconnect the connection.

I noticed that when seeing during an smb1cli_close()
from tstream_smbXcli_np_destructor().

TODO: we may want to have a similar smbXcli_conn_cancel_read_req() in future.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
libcli/smb/smbXcli_base.c