summaryrefslogtreecommitdiff
path: root/libcli
AgeCommit message (Collapse)AuthorFilesLines
2014-12-18libcli/smb: only force signing of smb2 session setups when binding a new sessionStefan Metzmacher1-1/+6
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10958 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): Fri Dec 12 23:11:40 CET 2014 on sn-devel-104 (cherry picked from commit daff0f5d709eca621a7f319c892ecaba7b03e5c2) Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-1-test): Thu Dec 18 23:00:51 CET 2014 on sn-devel-104
2014-12-04libcli: SMB2: Pure SMB2-only negprot fix to make us behave as a Windows ↵Jeremy Allison1-0/+11
client does. Required as some servers return zero when asked for zero credits in an initial SMB2-only negprot. Back-port of c426f97238e4f664d1b13781101ca9c942aa7d0d from master. https://bugzilla.samba.org/show_bug.cgi?id=10966 Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-1-test): Thu Dec 4 21:55:16 CET 2014 on sn-devel-104
2014-11-24samba: pass down size_t instead of int to add_string_to_array().Günther Deschner1-1/+1
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Mon Nov 17 19:53:22 CET 2014 on sn-devel-104 The last 3 patches address BUG: https://bugzilla.samba.org/show_bug.cgi?id=10942 cleanup add_string_to_array and usage
2014-10-09s3: smb2cli: query info return length check was reversed.Jeremy Allison1-1/+1
Make it identical to the check in libcli/smb/smb2cli_ioctl.c https://bugzilla.samba.org/show_bug.cgi?id=10848 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: "Stefan (metze) Metzmacher" <metze@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Oct 2 04:42:26 CEST 2014 on sn-devel-104 (cherry picked from commit 6c05cd3e895831be7d9a68a51de2048d04c188a0) Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-1-test): Thu Oct 9 23:43:36 CEST 2014 on sn-devel-104
2014-09-27libcli: Fix a segfault calling smbXcli_req_set_pending() on NULL.Andreas Schneider1-1/+0
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10817 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Sep 23 04:23:05 CEST 2014 on sn-devel-104 (cherry picked from commit f92086f4a347dcc8fa948aa2614a2c12f1115e5a) Signed-off-by: Andreas Schneider <asn@samba.org>
2014-09-08libcli/dns: ignore NS entries in dns_hosts_file.c at a higher log level for nowStefan Metzmacher1-0/+12
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 3fcc4a545e936c2c0cf3f9f9a19646e1512f74d2)
2014-09-08libcli/dns: add AAAA support to dns_hosts_file.cStefan Metzmacher1-7/+16
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 7f18a3b58e7146e421653b85f509bb8503bd7402)
2014-09-01libcli/security: add better detection of SECINFO_[UN]PROTECTED_[D|S]ACL in ↵Stefan Metzmacher1-16/+20
get_sec_info() Bug: https://bugzilla.samba.org/show_bug.cgi?id=10773 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Aug 22 02:52:50 CEST 2014 on sn-devel-104
2014-08-07libcli/auth: also set secure channel type in netlogon_creds_client_init().Günther Deschner2-0/+3
Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit a9d5b2fdf03a25e7669258de6c83288be3335cef)
2014-07-15s4-dsacl: Fixed incorrect handling of privileges in sec_access_check_dsNadezhda Ivanova1-8/+4
Restore and backup privileges are not relevant to ldap access checks, and the TakeOwnership privilege should grant write_owner right Signed-off-by: Nadezhda Ivanova <nivanova@symas.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit daefca2a1aaa9f4e0ca2f17ef4c9a71412c081ea)
2014-06-10s3: client - rename 'struct smb2_create_returns' to 'struct ↵Jeremy Allison3-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> (cherry picked from commit 2900dfa5b928ef237e72ac4e15481e083d61750a)
2014-04-29libcli/cldap: Add utility to create netlogon filterBenjamin Franzke2-40/+52
This utility is splitted of from cldap_netlogon_send. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@symas.com> (cherry picked from commit e306250a250d20a43cbe4c72ece34ebd475fa39c)
2014-04-01smbreadline: switch to new-style readline typedefGustavo Zacarias1-1/+1
Function, CPFunction, CPPFunction and VFunction typedefs are considered old-style (deprecated) starting from readline 4.2 (circa 2001). Compatibility typedefs have been in place up to readline 6.2 but were removed with the 6.3 release thus causing builds to break. Switch to the new-style specific prototyped typedef. Return value is unused so the callback should still be void (see readline/input.c around line 456 in version 6.3). Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Mar 13 00:21:47 CET 2014 on sn-devel-104 (cherry picked from commit 29d779c7029f89e530994c45ae065707ffd62c43) Fix bug #10506 - smbreadline doesn't build with readline 6.3.
2014-04-01libcli/smb: add SMB_BUFFER_SIZE_MIN/MAX definesStefan Metzmacher1-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> (cherry picked from commit 900839e2216048a614f2f0aeb1f79092fc93334f)
2014-03-10libcli/smb: add SMB2_HDR_FLAG_DFS for SMB2 Create operations on dfs sharesStefan Metzmacher1-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> (cherry picked from commit 60f16bacdc242a8512df352dcdd625661e4b25ad)
2014-03-10libcli/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> (cherry picked from commit b16b469f3fa3766c19ca30f377cc7de6782c05e6)
2014-03-10libcli/smb: move Filesystem Attributes defines to smb_constants.hStefan Metzmacher1-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> (cherry picked from commit e6eb6b9e9494d1c8db311e5b967b0da4d75c45aa)
2014-03-10libcli/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> (cherry picked from commit 44224cd40fcec262085423577de9eede27a4a22a)
2014-03-10libcli/smb: add smbXcli_tcon_{set,get}_fs_attributes()Stefan Metzmacher2-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> (cherry picked from commit 1c4e95cbd88e6122c1e2fb07b119abf225c94fff)
2014-03-10libcli/smb: add smbXcli_tcon_is_dfs_share()Stefan Metzmacher2-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> (cherry picked from commit e0fe97c543b2845e3515ffc2c638e4252164beed)
2014-03-10libcli/smb: Introduce smbXcli_conn_dfs_supportedLuk Claes2-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> (cherry picked from commit 24e7be87d17910c1f4170ecd5fe2d2a8b1419ba5)
2013-12-09Merge tag 'samba-4.1.3' into v4-1-testKarolin Seeger1-0/+5
samba: tag release samba-4.1.3
2013-12-05CVE-2013-4408:libcli/util: add some size verification to ↵Stefan Metzmacher1-0/+5
tstream_read_pdu_blob_done() Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-11-22docs: remove duplicate word "name" in nmblookup4 manpage.Günther Deschner1-1/+1
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 4112eb0529780113716c6032561504196be8235f)
2013-11-06libcli/smb: fix smb2cli_ioctl*() against Windows 2008.Stefan Metzmacher1-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 (cherry picked from commit 127fc670a39d15eaa3869045fca0287ba7df9efa)
2013-09-19libcli/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 (cherry picked from commit 4879d0810a2ad741e32ad174a7a14cd35521aeaf)
2013-09-19libcli/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 (cherry picked from commit af290a03cef63c3b08446c1980de064a3b1c8804)
2013-09-18libcli/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> (cherry picked from commit 1d54d8c501afa151b6cc07b98a14caae2b31ec65)
2013-08-30As SMB3 has transport level encryption, allow smbclient -e to force encryted ↵Jeremy Allison2-0/+22
SMB3 transport. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> (cherry picked from commit 81e1058e20bcfc1efab2b39dd7642d8dbbe0cb3b)
2013-08-30libcli/smb: add smb2cli_conn_req_possible()Stefan Metzmacher2-0/+23
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 7efdc323d1a1abdae70bcafefe07b3cffcdb2521)
2013-08-30libcli/smb: add smb1cli_conn_req_possible()Stefan Metzmacher2-0/+18
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 111f529a2a5832b822445bb4f63b142d8ccb2cb7)
2013-08-30libcli/smb: pass max_dyn_len to smb2cli_req_send()Stefan Metzmacher13-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> (cherry picked from commit 44b53937d59842a63e2cbfa92219f4f519530b0a)
2013-08-30libcli/smb: pass max_dyn_len to smb2cli_req_create()Stefan Metzmacher2-4/+10
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 4a3352020db962ef40728d8a754da8a9418ca8a7)
2013-08-30libcli/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> (cherry picked from commit 318735fd5e15c5fd7010c0f657c86d27b45279ac)
2013-08-30libcli/smb: Change smb2cli_create() and smb2cli_create_recv() to return a ↵Jeremy Allison3-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> (cherry picked from commit 1229881df6bd22d4b5055ad283061332ba1c9bc8)
2013-08-30libcli/smb: Fix smb2cli_write_recv() and smb2cli_write() to return the bytes ↵Jeremy Allison2-7/+29
written. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 00f784ec91d2cfa95b20327ac20f5bc3fa1f400e)
2013-08-30libcli/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> (cherry picked from commit 97288b7f1048c1bf712463293a1e62737738292c)
2013-08-07Add error map of STATUS_INVALID_EA_NAME -> ERRDOS, ERRbadfileJeremy Allison1-0/+1
(from Windows2012 tests). Bug 9992 - Windows error 0x800700FE when copying files with xattr names containing ":" Signed-off-by: Jeremy Allison <jra@samba.org>
2013-06-24libcli/ldap: Cope with substring match with no chunks in ldap_push_filterAndrew Bartlett1-18/+21
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-06-21Add missing SMB2/SMB3 share capability flag defineSteve French1-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
2013-06-19build: Build with system md5.h on OpenIndianaAndrew Bartlett5-9/+9
This changes (again...) our system md5 detection to cope with how OpenIndiana does md5. I'm becoming increasingly convinced this isn't worth our while (we should have just done samba_md5...), but for now this change seems to work on FreeBSD, OpenIndiana and Linux with libbsd. This needs us to rename struct MD5Context -> MD5_CTX, but we provide a config.h define to rename the type bad if MD5_CTX does not exist (it does however exist in the md5.h from libbsd). Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jun 19 21:32:36 CEST 2013 on sn-devel-104
2013-05-20doserr: add mapping for WERR_PRINT_PROCESSOR_ALREADY_INSTALLED.Günther Deschner1-0/+1
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-04-30libcli: Add smb2_lease marshallingVolker Lendecke3-0/+94
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-04-30libsmb: Move "struct smb2_lease" to commonVolker Lendecke3-0/+45
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-04-18libcli/smb: add SMB2_LEASE_FLAG_* definesStefan Metzmacher1-0/+4
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-04-12schannel_store.tdb: make it schannel_store.ntdb if 'use ntdb'.Rusty Russell1-1/+1
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-12libcli/auth: convert to dbwrap.Rusty Russell3-39/+37
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-02Add a comment about why we are removing the INHERITED bit so people understand.Richard Sharpe1-0/+9
Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Apr 2 20:05:13 CEST 2013 on sn-devel-104
2013-03-28Make sure that we only propogate the INHERITED flag when we are allowed to.Richard Sharpe1-1/+2
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Mar 28 19:43:41 CET 2013 on sn-devel-104
2013-03-28libcli/auth: avoid using transactions a chainlock is enoughStefan Metzmacher1-10/+26
We're just writting a single record into a CLEAR_IF_FIRST|TDB_NOSYNC tdb. We just need to make sure we lock the record between reading and writting. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Mar 28 14:52:14 CET 2013 on sn-devel-104