Stefan Metzmacher
6054e9a48b
libcli/smb: add smb2cli_session_get_flags()
...
metze
2012-04-16 12:54:52 +02:00
Stefan Metzmacher
c60c2c5d94
libcli/smb: we should not force a session key for anonymous connections
...
smb2cli_session_set_session_key() should not check for a valid session
key, if the connection is a guest or null session.
metze
2012-04-16 12:54:52 +02:00
Stefan Metzmacher
b23f5a9418
libcli/smb: make use of data_blob_string_const_null()
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Apr 16 12:21:17 CEST 2012 on sn-devel-104
2012-04-16 12:21:17 +02:00
Michael Adam
ac43937ce4
smbXcli: add the possiblilty to negotiate client capabilites in smb >= 2.2
...
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-03-03 17:03:07 +01:00
Michael Adam
f981257240
libcli/smb/smb2_signing: rename smb2_key_deviration -> smb2_key_derivation
...
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Feb 29 09:01:54 CET 2012 on sn-devel-104
2012-02-29 09:01:54 +01:00
Stefan Metzmacher
c9219fe585
libcli/smb/smbXcli: use smb2_key_deviration() to setup SMB 2.24 keys
...
This uses the key diveration function from "NIST Special Publication 800-108"
in counter mode (section 5.1).
Thanks to Jeremy, Michael and Volker for the debugging!
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Feb 29 04:54:48 CET 2012 on sn-devel-104
2012-02-29 04:54:46 +01:00
Stefan Metzmacher
615c41ce12
libcli/smb/smb2_signing: pass down 'protocol' to smb2_signing_[sign|check]_pdu()
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Feb 27 14:26:32 CET 2012 on sn-devel-104
2012-02-27 14:26:32 +01:00
Stefan Metzmacher
910251e8ed
libcli/smb/smbXcli: remove unused if statement from smb2cli_conn_dispatch_incoming()
...
metze
2012-02-27 12:51:34 +01:00
Stefan Metzmacher
a1ef9c761a
libcli/smb/smbXcli: add smb2cli_session_application_key()
...
metze
2012-02-27 12:51:34 +01:00
Stefan Metzmacher
aa4331be9e
libcli/smb/smbXcli: maintain smb2 channel_signing_key separate from the signing_key
...
The signing_key is fix across all channels and is used for session setups
on a channel binding.
Note:
- the last session setup response is signed with the new channel signing key.
- the reauth session setups are signed with the channel signing key.
It's also not needed to remember the main session key.
metze
2012-02-27 12:51:33 +01:00
Stefan Metzmacher
b93f6ac79c
libcli/smb/smbXcli: remove unused checks from smb2cli_session_create_channel()
...
metze
2012-02-27 12:51:33 +01:00
Andrew Bartlett
5ad7665b63
libcli/smb: Convert struct smb_trans_enc_state to talloc
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-31 20:17:10 +01:00
Stefan Metzmacher
c543ce1028
libcli/smb: fix smbXcli_negprot(..., PROTOCOL_NT1, PROTOCOL_SMB2_02)
...
The SMB1 negprot request already consumed the SMB2 sequence '0'.
This also happens for the SMB 2.02 case.
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jan 27 15:27:41 CET 2012 on sn-devel-104
2012-01-27 15:27:40 +01:00
Volker Lendecke
f1432d14a4
libcli/smb: Add smbXcli_conn_samba_suicide
...
This is a pure test tool against Samba servers
2012-01-05 13:09:36 +01:00
Stefan Metzmacher
2bd2f3880e
libcli/smb: add PROTOCOL_SMB2_24 support
...
metze
2011-12-22 15:58:45 +01:00
Stefan Metzmacher
13dbef241b
smbXcli: add support for SMBreadBraw
...
metze
2011-11-29 16:00:08 +01:00
Stefan Metzmacher
e450c45e67
smbXcli: add smb1cli_conn_server_{readbraw,writebraw,lockread,writeunlock}()
...
metze
2011-11-29 16:00:08 +01:00
Stefan Metzmacher
f0d8038ed8
smbXcli: rebuild smb1.recv_iov array if we expect more than one response
...
metze
2011-11-29 16:00:07 +01:00
Stefan Metzmacher
8c7e7ee91b
smbXcli: allow up to 10 iovec elements for the bytes in smb1cli_req_create()
...
The smb1cli_trans_* code uses up to 6 elements, which was too much for
the current limit of 5.
metze
2011-11-29 16:00:07 +01:00
Stefan Metzmacher
3453665bcb
smbXcli: s/smb2cli_writev_done/smb2cli_req_writev_done
...
This is a better name and it matches smb1cli_req_writev_done
metze
2011-11-29 16:00:07 +01:00
Stefan Metzmacher
c9ca3bb492
smbXcli: call tevent_queue_stop() for the outgoing queue on disconnect
...
metze
2011-11-29 16:00:07 +01:00
Stefan Metzmacher
91cb09fa0c
smbXcli: use talloc_stackframe() instead of talloc_tos() in smb1cli_conn_signv()
...
metze
2011-11-29 16:00:07 +01:00
Volker Lendecke
7491bd78d6
Fix Coverity ID 2638: OVERRUN_STATIC
2011-11-28 14:52:32 +01:00
Volker Lendecke
f094cc3ade
Fix Coverity ID 2639: UNUSED_VALUE
2011-11-28 14:52:31 +01:00
Volker Lendecke
d287fe5399
s3:libsmb: Fix a typo
2011-11-24 19:02:33 +01:00
Stefan Metzmacher
a210d9fa05
s3:smbXcli: keep two fd per connection in order to work with the epoll tevent backend
...
metze
2011-11-24 19:02:33 +01:00
Stefan Metzmacher
bda3d491b4
smbXcli: add smb2cli_req_set_notify_async()
...
That can be used if the caller wants to be notified if
the async interim response arrives.
metze
2011-11-24 19:02:31 +01:00
Stefan Metzmacher
0995d68d59
smbXcli: add support for tevent_req_cancel() on smbXcli_req
...
metze
2011-11-24 19:02:31 +01:00
Stefan Metzmacher
91ffe696aa
smbXcli: fix smb signing for SMBntcancel
...
metze
2011-11-24 19:02:31 +01:00
Stefan Metzmacher
c2a39f4ecd
smbXcli: add smb2cli_session_create_channel()
...
This makes it possible to implement SMB 2.22 Multi-Channel
for testing.
metze
2011-11-24 19:02:31 +01:00
Stefan Metzmacher
99b3d57fc3
s3:smb2cli: make use of smbXcli_session and setup the session key for SMB2 signing
...
metze
2011-11-24 19:02:31 +01:00
Stefan Metzmacher
396d7a7dd3
smbXcli: add support for smb2 signing
...
metze
2011-11-24 19:02:31 +01:00
Stefan Metzmacher
3fd54b57c1
smbXcli: add smbXcli_session infrastructure
...
metze
2011-11-24 19:02:31 +01:00
Stefan Metzmacher
4435dad827
smbXcli: add support for PROTOCOL_SMB2_22 in smbXcli_negprot()
...
metze
2011-11-24 19:02:31 +01:00
Stefan Metzmacher
9d06e0fcc7
smbXcli: add support for SMB2 multi-credit requests
...
metze
2011-11-24 19:02:31 +01:00
Stefan Metzmacher
d533543166
smbXcli: add support for 2.??? negprot and PROTOCOL_SMB2_10
...
metze
2011-11-24 19:02:31 +01:00
Stefan Metzmacher
1cfeb3f8a0
smbXcli: pass client_guid to smbXcli_conn_create()
...
metze
2011-11-24 19:02:31 +01:00
Stefan Metzmacher
ceb063ca7d
smbXcli: add smbXcli_negprot_*
...
This supports negotiation of any SMB1 or SMB2 dialect.
metze
2011-11-24 19:02:30 +01:00
Stefan Metzmacher
b958498c2a
smbXcli: add helper functions to access the negotiated features
...
metze
2011-11-24 19:02:30 +01:00
Stefan Metzmacher
1a0ce02a23
smbXcli: also notify chained requests about broken connections
...
metze
2011-11-24 19:02:30 +01:00
Stefan Metzmacher
4d8e151779
smbXcli: simplify smb1cli_req_chain_submit()
...
We should hang everything on the first request in the chain,
as that's the one that gets added to the pending array.
metze
2011-11-24 19:02:30 +01:00
Stefan Metzmacher
e2912fa853
smbXcli: remove unused smb1cli_have_andx_command()
...
metze
2011-11-24 19:02:30 +01:00
Stefan Metzmacher
fee3a0a657
smbXcli: reorder smb1cli_conn_dispatch_incoming() to avoid too much nesting
...
metze
2011-11-24 19:02:30 +01:00
Stefan Metzmacher
0f194e35a6
smbXcli: rework smb1cli_req_recv() to expose an iov with 3 elements
...
Each smb1cli_req has 3 iov elements
[SMB HDR, SMB Parameter Block, SMB Data Block].
The 'inbuf' is still exposed if the caller requires it
(until we fix all legacy callers).
The can now pass an array of expected [status,wct] combinations,
instead of just one expected min_wct.
metze
2011-11-24 19:02:30 +01:00
Stefan Metzmacher
ce224f4d25
smbXcli: use smb1cli_inbuf_parse_chain() and remember more details per chain response
...
metze
2011-11-24 19:02:30 +01:00
Stefan Metzmacher
7c5651c3f6
smbXcli: add smb1cli_inbuf_parse_chain()
...
metze
2011-11-24 19:02:30 +01:00
Stefan Metzmacher
94cb738dd4
smbXcli: pass hdr to smb1cli_pull_raw_error()
...
metze
2011-11-24 19:02:30 +01:00
Stefan Metzmacher
4529395d3c
smbXcli: add state->smb1.recv_{cmd,status,iov}
...
In the following commits we will need to remember a few more things.
metze
2011-11-24 19:02:30 +01:00
Stefan Metzmacher
5e7cf194d2
smbXcli: split out a smb1cli_req_flags() function
...
metze
2011-11-24 19:02:30 +01:00
Stefan Metzmacher
2a570e6305
smbXcli: set message id to UINT64_MAX for BREAK in smb2cli_req_create()
...
This way the caller can register an oplock handler.
Note that smb2cli_req_compound_submit() will overwrite this
if a request is send over the wire.
metze
2011-11-24 19:02:30 +01:00