summaryrefslogtreecommitdiffstats
path: root/libcli/smb
Commit message (Collapse)AuthorAgeFilesLines
* libsmb: Put the "smb2_lease" struct into idlVolker Lendecke2014-06-123-20/+5
| | | | | | | | | | | | This will make it easier in the future to NDR_PRINT a lease and a lease key Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jun 12 03:34:41 CEST 2014 on sn-devel-104
* add FSCTL_SET_ZERO_ON_DEALLOCATION defineBjörn Jacke2014-05-151-0/+1
| | | | | | | | Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Thu May 15 15:16:34 CEST 2014 on sn-devel-104
* add FSCTL_SET_ZERO_DATA fsctl defineBjörn Jacke2014-05-151-0/+1
| | | | | | | | fallocalte with the FALLOC_FL_ZERO_RANGE flag introduced with Linux 3.15 should be able to do this soon Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: client - rename 'struct smb2_create_returns' to 'struct ↵Jeremy Allison2014-05-093-7/+7
| | | | | | | smb_create_returns' so we can use this in SMB1 create returns as well. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* libcli/smb: add smb_signing_is_desired()Stefan Metzmacher2014-04-162-0/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli/smb: reuse tstream_smbXcli_np_disconnect_send/recv as helperStefan Metzmacher2014-03-251-60/+14
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli/smb: add tstream_smbXcli_np_disconnect_cleanup() to handle ↵Stefan Metzmacher2014-03-251-0/+58
| | | | | | | | | | | | talloc_free(req) If the tevent_req of tstream_smbXcli_np_disconnect_* is explicitly or implicitly free'ed, we need to make sure we still deliver the close request to the server! Otherwise the SMB signing sequence gets out of sync. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli/smb: make TSTREAM_SMBXCLI_NP_MAX_BUF_SIZE publicStefan Metzmacher2014-03-252-20/+20
| | | | | | | | This should be used to negotiate the may fragment size of DCERPC connections. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli/smb: keep references to smbXcli_{conn,session,tcon} in tstream_smbXcli_npStefan Metzmacher2014-03-251-9/+53
| | | | | | | | This fixes some valgrind errors when the smbXcli_tcon disappears before the smbXcli_conn. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli/smb: add SMB_BUFFER_SIZE_MIN/MAX definesStefan Metzmacher2014-03-051-0/+8
| | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10422 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libcli/smb: make use of tevent_req_set_cleanup_fn()Stefan Metzmacher2014-01-171-10/+16
| | | | | | | This is more better than a custom tevent_req destructor. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* libcli/smb: s/tstream_cli_np/tstream_smbXcli_npStefan Metzmacher2014-01-072-224/+226
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libcli/smb: s/TSTREAM_CLI_NP/TSTREAM_SMBXCLI_NPStefan Metzmacher2014-01-071-11/+11
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libcli/smb: move source3/libsmb/cli_np_tstream.c to tstream_smbXcli_np.cStefan Metzmacher2014-01-073-0/+1389
| | | | | | | This code is generic enough to have it in the top level now. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libcli/smb: add smb1cli_readx*Gregor Beck2014-01-073-0/+238
| | | | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Gregor Beck <gbeck@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libcli/smb: add smb1cli_writex*Gregor Beck2014-01-073-0/+312
| | | | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Gregor Beck <gbeck@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libcli/smb: add smb1cli_close*Gregor Beck2014-01-073-0/+206
| | | | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Gregor Beck <gbeck@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libcli/smb: add smb1cli_ntcreatex*Gregor Beck2014-01-073-0/+405
| | | | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Gregor Beck <gbeck@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libcli/smb: move some *TRANSACT_* flags to smb_constants.hStefan Metzmacher2014-01-071-0/+34
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libcli/smb: move some FILE_* flags to smb_constants.hStefan Metzmacher2014-01-071-0/+50
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libcli/smb: fix smb2cli_ioctl*() against Windows 2008.Stefan Metzmacher2013-10-311-4/+29
| | | | | | | | | | | | | | | The subsections of [MS-SMB2] "3.2.5.14 Receiving an SMB2 IOCTL Response" say the client should ignore the InputOffset/InputCount. We do that only if we ask for max_input_length = 0. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10232 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Oct 31 01:16:10 CET 2013 on sn-devel-104
* libcli/smb: add SMB2_HDR_FLAG_DFS for SMB2 Create operations on dfs sharesStefan Metzmacher2013-10-171-1/+9
| | | | | | | 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>
* libcli/smb: add FLAG_CASELESS_PATHNAMES based on FILE_CASE_SENSITIVE_SEARCH ↵Stefan Metzmacher2013-10-171-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>
* libcli/smb: move Filesystem Attributes defines to smb_constants.hStefan Metzmacher2013-10-171-0/+19
| | | | | | | 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>
* libcli/smb: add FLAGS2_DFS_PATHNAMES for SMB1 operations against dfs sharesStefan Metzmacher2013-10-171-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>
* libcli/smb: add smbXcli_tcon_{set,get}_fs_attributes()Stefan Metzmacher2013-10-172-0/+17
| | | | | | | | | | 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>
* libcli/smb: add smbXcli_tcon_is_dfs_share()Stefan Metzmacher2013-10-172-0/+27
| | | | | | | 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>
* libcli/smb: Introduce smbXcli_conn_dfs_supportedLuk Claes2013-10-172-0/+11
| | | | | | | | 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>
* libcli/smb: add smb2cli_tcon_is_encryption_on()Michael Adam2013-10-152-0/+6
| | | | | | | https://bugzilla.samba.org/show_bug.cgi?id=10208 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libcli: Correct smb2_lease_pullVolker Lendecke2013-10-061-4/+4
| | | | | | | | We don't really use leases yet, so so far this went by unnoticed. It's the V2 lease requests that hold the parent lease key, not the V1 ones. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* libcli: Add const to smb2_lease_pullVolker Lendecke2013-10-062-2/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* libcli/smb: only check the SMB2 session setup signature if required and validStefan Metzmacher2013-09-181-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
* libcli/smb: fix non mendatory signing against some vendor SMB2 servers.Stefan Metzmacher2013-09-171-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
* libcli/smb: use SMB1 MID=0 for the initial NegprotStefan Metzmacher2013-09-171-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>
* libcli/smb: negotiate SMB3_DIALECT_REVISION_302 if PROTOCOL_SMB3_02 is requestedStefan Metzmacher2013-09-171-0/+1
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libcli/smb: add PROTOCOL_SMB3_02Stefan Metzmacher2013-09-171-2/+3
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libcli/smb: add SMB3_DIALECT_REVISION_302Stefan Metzmacher2013-09-171-0/+1
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* As SMB3 has transport level encryption, allow smbclient -e to force encryted ↵Jeremy Allison2013-08-212-0/+22
| | | | | | | SMB3 transport. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* libcli/smb: add smb2cli_conn_req_possible()Stefan Metzmacher2013-08-152-0/+23
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libcli/smb: add smb1cli_conn_req_possible()Stefan Metzmacher2013-08-152-0/+18
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libcli/smb: pass max_dyn_len to smb2cli_req_send()Stefan Metzmacher2013-08-1513-16/+50
| | | | | | | | 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>
* libcli/smb: pass max_dyn_len to smb2cli_req_create()Stefan Metzmacher2013-08-152-4/+10
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libcli/smb: calculate the credit charge on the input and output dyn_lenStefan Metzmacher2013-08-151-1/+11
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libcli/smb: Change smb2cli_create() and smb2cli_create_recv() to return a ↵Jeremy Allison2013-08-153-23/+35
| | | | | | | | | parameter blob of the newly opened/created file. Will use in the smb2 client code. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* libcli/smb: Fix smb2cli_write_recv() and smb2cli_write() to return the bytes ↵Jeremy Allison2013-08-152-7/+29
| | | | | | | written. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* libcli/smb: fix the credit handling on a SMB1 => SMB2 negotiateStefan Metzmacher2013-08-151-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>
* libsmb: Remove an unnecessary variable assignmentVolker Lendecke2013-08-121-2/+1
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libsmb: Avoid an unnecessary "else"Volker Lendecke2013-08-121-1/+3
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib: add FSCTL_[GET/SET]_COMPRESSION constantsDavid Disseldorp2013-08-091-0/+3
| | | | | | | Values taken from MS-FSCC. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Add missing SMB2/SMB3 share capability flag defineSteve French2013-06-211-0/+1
| | | | | | | | | | SMB3.02 adds SHARE_CAP_ASYMMETRIC Signed-off-by: Steve French <smfrench@gmail.com> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Jun 21 22:57:16 CEST 2013 on sn-devel-104