summaryrefslogtreecommitdiff
path: root/libcli/smb/smbXcli_base.c
AgeCommit message (Collapse)AuthorFilesLines
2013-10-17libcli/smb: add FLAG_CASELESS_PATHNAMES based on FILE_CASE_SENSITIVE_SEARCH ↵Stefan Metzmacher1-0/+7
to smb1 requests Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-17libcli/smb: add FLAGS2_DFS_PATHNAMES for SMB1 operations against dfs sharesStefan Metzmacher1-0/+6
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-17libcli/smb: add smbXcli_tcon_{set,get}_fs_attributes()Stefan Metzmacher1-0/+14
These are the attributes returned from the FileFsAttributeInformation request. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-17libcli/smb: add smbXcli_tcon_is_dfs_share()Stefan Metzmacher1-0/+26
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-17libcli/smb: Introduce smbXcli_conn_dfs_supportedLuk Claes1-0/+9
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Luk Claes <luk@debian.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-15libcli/smb: add smb2cli_tcon_is_encryption_on()Michael Adam1-0/+5
https://bugzilla.samba.org/show_bug.cgi?id=10208 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-09-18libcli/smb: only check the SMB2 session setup signature if required and validStefan Metzmacher1-5/+21
This is an update to commit af290a03cef63c3b08446c1980de064a3b1c8804 that skips the scary debug messages. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10146 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Sep 18 04:46:00 CEST 2013 on sn-devel-104
2013-09-17libcli/smb: fix non mendatory signing against some vendor SMB2 servers.Stefan Metzmacher1-1/+10
Windows and Samba always sign the final session setup response even if signing is not mendatory, but it ensures that the signing key is correctly in place. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10146 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Sep 17 09:40:10 CEST 2013 on sn-devel-104
2013-09-17libcli/smb: use SMB1 MID=0 for the initial NegprotStefan Metzmacher1-0/+8
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10144 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-09-17libcli/smb: negotiate SMB3_DIALECT_REVISION_302 if PROTOCOL_SMB3_02 is requestedStefan Metzmacher1-0/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-21As SMB3 has transport level encryption, allow smbclient -e to force encryted ↵Jeremy Allison1-0/+21
SMB3 transport. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-15libcli/smb: add smb2cli_conn_req_possible()Stefan Metzmacher1-0/+22
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15libcli/smb: add smb1cli_conn_req_possible()Stefan Metzmacher1-0/+17
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15libcli/smb: pass max_dyn_len to smb2cli_req_send()Stefan Metzmacher1-3/+4
This way we can calculate the correct credit charge for requests with large output buffers. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15libcli/smb: pass max_dyn_len to smb2cli_req_create()Stefan Metzmacher1-3/+8
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15libcli/smb: calculate the credit charge on the input and output dyn_lenStefan Metzmacher1-1/+11
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15libcli/smb: fix the credit handling on a SMB1 => SMB2 negotiateStefan Metzmacher1-1/+6
Our cur_credit value had 1 credit too many in the case of an SMB1 => SMB2 upgrade. When we max out the credits the server disconnected the connection. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-12libsmb: Remove an unnecessary variable assignmentVolker Lendecke1-2/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-12libsmb: Avoid an unnecessary "else"Volker Lendecke1-1/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-03-20libcli/smb: smb1cli_inbuf_parse_chain() and smb1cli_conn_dispatch_incoming() ↵Jeremy Allison1-2/+2
should use smb_len_tcp. They have to cope with large READX call replies that have a length greater than smb_len_nbt() can handle. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-20libcli/smb: defer failing for missing NEGOTIATE_SECURITY_SIGNATURES_ENABLEDStefan Metzmacher1-0/+9
Windows servers take a look at the FLAGS2_SMB_SECURITY_SIGNATURES_REQUIRED flag during a session setup and turn on signing if the client requires it. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-02-19libcli/smb: make use of samba_tevent_context_init()Stefan Metzmacher1-2/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-01-30Add new function smbXcli_session_copy(), to be used when creating compound ↵Jeremy Allison1-0/+27
SMB2 requests. Copies the signing state needed to make client compound requests work on signed connections. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
2012-11-01libcli/smb: add smbXcli_session_set_disconnect_expired() (bug #9175)Stefan Metzmacher1-0/+34
This should be a short term hack until the upper layers have implemented re-authentication. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2012-08-17libcli/smb: make sure the SMB2_TRANSFORM pdu is completeStefan Metzmacher1-3/+12
metze
2012-08-16libcli/smb: support broken OS/2 error responses bug #9096Stefan Metzmacher1-3/+57
OS/2 skips the DATA Block in SMB1 responses. metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Aug 16 13:16:49 CEST 2012 on sn-devel-104
2012-08-15libcli/smb: verify decrypted SMB2 pdus correctlyStefan Metzmacher1-2/+38
We need to make sure we got a encrypted response if we asked for it. If we don't get a encrypted response, we use a similar logic as with signing to propagated wellknown errors to the higher layer and set state->smb2.signing_skipped = true. metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Aug 15 16:26:26 CEST 2012 on sn-devel-104
2012-08-15libcli/smb: fix parsing of compounded messages within a SMB2_TRANSFORM pduStefan Metzmacher1-5/+12
One SMB2_TRANSFORM pdu wraps multiple SMB2 pdus. We inject the SMB2_TRANSFORM header to each response which was wrapped inside. This allows the next layer to verify if the SMB2 pdu was encrypted. metze
2012-08-15libcli/smb: fix smb2cli_req_compound_submit for multiple encrypted messagesStefan Metzmacher1-63/+104
There should be only one SMB2_TRANSFORM header for all compound requests. metze
2012-08-15libcli/smb: all flags except SMB2_HDR_FLAG_ASYNC should be cleared in a ↵Stefan Metzmacher1-0/+6
cancel request. metze
2012-08-08libcli/smb: do not set SMB2_TF_MSG_SIZE in the callerStefan Metzmacher1-3/+0
metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Aug 8 07:32:55 CEST 2012 on sn-devel-104
2012-08-04libcli/smb: add smb1cli_session_protect_session_key()Stefan Metzmacher1-0/+24
metze
2012-08-04libcli/smb: pass hdr/len to smb_signing_check/sign_pdu() and skip the nbt headerStefan Metzmacher1-9/+17
metze
2012-08-01libcli/smb: remove unused smb2cli_session_application_key()Stefan Metzmacher1-18/+0
metze
2012-08-01libcli/smb: add smbXcli_session_application_key()Stefan Metzmacher1-0/+30
metze
2012-08-01libcli/smb: allow resetting of the smb1 application_keyStefan Metzmacher1-2/+6
We need this untill we have fixed all callers... metze
2012-08-01libcli/smb: let smb1cli_session_set_id() reset the application_keyStefan Metzmacher1-0/+1
We have some callers which reuse smbXcli_session, e.g. cli_state_set_uid() metze
2012-08-01libcli/smb: add smb1cli_session_set_session_key()Stefan Metzmacher1-0/+34
metze
2012-07-26libcli/smb: add basic session->smb2.channel_sequence handlingStefan Metzmacher1-0/+33
metze
2012-07-26libcli/smb: introduce a smb2cli_sessionStefan Metzmacher1-107/+93
This maintains the shared state between multiple session channels. metze
2012-07-25libcli/smb: setup tcon->smb2.should_encrypt in smb2cli_tcon_set_values()Stefan Metzmacher1-1/+16
metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Jul 25 16:44:22 CEST 2012 on sn-devel-104
2012-07-25libcli/smb: pass smbXcli_session to smb2cli_tcon_set_values()Stefan Metzmacher1-0/+1
metze
2012-07-25libcli/smb: there's no PID field in the SMB2/3 header anymoreStefan Metzmacher1-8/+4
It's a reserved field... metze
2012-07-25libcli/smb: pass smbXcli_tcon to smb2cli_req_create/send()Stefan Metzmacher1-12/+17
metze
2012-07-25libcli/smb: add smb2cli_tcon_capabilities()Stefan Metzmacher1-0/+5
metze
2012-07-24libcli/smb: pass down smbXcli_tcon to smb1cli_req_create/send() and ↵Stefan Metzmacher1-6/+12
smb1cli_trans* metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Jul 24 21:22:44 CEST 2012 on sn-devel-104
2012-07-24libcli/smb: add smbXcli_tcon structureLuk Claes1-0/+89
Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-07-24libcli/smb: pass down smbXcli_session to smb1cli_req_create/send() and ↵Stefan Metzmacher1-7/+12
smb1cli_trans* metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Jul 24 00:08:58 CEST 2012 on sn-devel-104
2012-07-23libcli/smb: introduce smb1.session for uid useLuk Claes1-0/+15
Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-07-23libcli/smb: set should_encrypt = true if we got SMB2_SESSION_FLAG_ENCRYPT_DATAStefan Metzmacher1-2/+15
metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Mon Jul 23 20:14:07 CEST 2012 on sn-devel-104