summaryrefslogtreecommitdiff
path: root/source4/libcli
AgeCommit message (Collapse)AuthorFilesLines
2019-07-16s4/libcli/raw: Fix 'Value stored to 'p' is never read'Noel Power1-1/+1
Fixes: source4/libcli/raw/clitree.c:138:3: warning: Value stored to 'p' is never read <--[clang] p += smbcli_req_pull_string(&req->in.bufinfo, mem_ctx, &parms->tconx.out.fs_type, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-07-16s4/libcli/raw: clang: Fix 'initialization value is never read'Noel Power1-2/+3
Fixes: source4/libcli/raw/rawnegotiate.c:157:11: warning: Value stored to 'status' during its initialization is never read <--[clang] NTSTATUS status = NT_STATUS_INTERNAL_ERROR; ^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-07-16s4/libcli: clang: Fix 'initialization value is never read'Noel Power1-1/+4
Fixes: source4/libcli/smb_composite/fetchfile.c:91:11: warning: Value stored to 'status' during its initialization is never read <--[clang] NTSTATUS status = NT_STATUS_UNSUCCESSFUL; ^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-07-16s4/libcli/ldab: clang: Fix 'Access results in a deref of a null pointer'Noel Power1-1/+1
Fixes: source4/libcli/ldap/ldap_client.c:1023:6: warning: Access to field 'type' results in a dereference of a null pointer <--[clang] if ((*msg)->type != type) { ^~~~~~~~~~~~ Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-06-30source4: Update all consumers of strtoul_err(), strtoull_err() to new APISwen Schillig1-1/+1
Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
2019-06-27lib/crypto: move gnutls error wrapper to own subsystemAndrew Bartlett2-2/+2
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2019-06-24s4:libcli: Use gnutls_error_to_ntstatus() or singingAndreas Schneider1-2/+3
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-05-27Fix ubsan null pointer passed as argument 2Gary Lockyer4-24/+50
Fix ubsan warning null pointer passed as argument 2 when the source pointer is NULL. The calls to memcpy are now guarded by an if (len > 0) Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Gary Lockyer <gary@samba.org> Autobuild-Date(master): Mon May 27 01:29:48 UTC 2019 on sn-devel-184
2019-05-22libcli/ldap: Remove unsued ldap_transaction()Andrew Bartlett1-23/+0
This is unsued since a87dea2a0894015cf4a3140995791f5468c40038 in 2007 when we moved to using LDB for LDAP in this area of the code. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-05-21s3:libcli: Use GnuTLS MD5 for smb singingAndreas Schneider1-24/+69
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-05-03libcli: Align integer typesVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-05-03libcli: Remove an unnecessary #includeVolker Lendecke1-1/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-05-01s4:libcli/raw: add RAW_FILEINFO_NORMALIZED_NAME_INFORMATION supportStefan Metzmacher3-12/+16
This is supported over the wire in SMB 3.1.1 on starting with Windows 10 1803. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13919 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-04-30s4:libcli:smb2: Use GnuTLS SHA256 HMAC for signingAndreas Schneider1-17/+32
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-04-01libsmb: Make "struct smb2_lock_element" generally usableVolker Lendecke1-6/+1
This struct will be of interest when we add locking capabilities to libcli/smb/smb2cli* Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-04-01libsmb: Rename InfoType from [MS-SMB2] according to the specVolker Lendecke2-5/+8
This makes it easier to find this via internet search Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-03-28s4:libcli/smb2: calculate the correct credit charge in smb2_notify_send()Stefan Metzmacher1-0/+2
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13863 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-03-28s4:libcli/smb2: calculate the correct credit charge in smb2_ioctl_send()Stefan Metzmacher1-0/+11
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13863 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-03-28s4:libcli/smb2: align struct smb_ioctl.smb2 to [MS-SMB2] namesStefan Metzmacher2-12/+13
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13863 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-03-28s4:libcli/smb2: calculate the correct credit charge in smb2_getinfo_send()Stefan Metzmacher1-0/+4
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13863 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-03-28s4:libcli/smb2: fix smb2_getinfo_send() marshallingStefan Metzmacher2-9/+20
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13863 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-03-28s4:libcli/smb2: don't schedule idle handlers on a dead connectionStefan Metzmacher1-0/+17
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-03-28s4:libcli/raw: don't schedule idle handlers on a dead connectionStefan Metzmacher1-0/+17
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-03-01source4: Use wrapper for string to integer conversionSwen Schillig1-2/+3
In order to detect an value overflow error during the string to integer conversion with strtoul/strtoull, the errno variable must be set to zero before the execution and checked after the conversion is performed. This is achieved by using the wrapper function strtoul_err and strtoull_err. Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Böhme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-02-28s4:libcli: remember return code from maximum accessRalph Boehme2-2/+3
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13812 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2019-01-26s4:libcli: Remove (now unused) pysmb.c bindingsTim Beale2-757/+0
The s4 SMB client bindings don't support SMBv2, so we've made the decision to use the s3 SMB client bindings/library code instead. Everything in the Samba codebase now uses the s3 bindings, and we'll add a warning message to Samba v4.10 that the s4 bindings are deprecated. This patch removes the unused s4 bindings completely for the next (i.e. v4.11) release. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13676 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Jan 26 04:05:25 CET 2019 on sn-devel-144
2019-01-17s4:pysmb: Add error log that the s4 bindings are deprecatedTim Beale1-0/+12
We plan to delete the s4 SMB Python bindings in the next Samba release after v4.10, but first give external consumers a heads-up, just in case they are currently using the s4 bindings. Note the auth_log tests still use the s4 bindings, but all user-facing tools should now be updated to use the s3 bindings. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13676 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-01-08libcli: Simplify smblsa_lookup_nameVolker Lendecke1-7/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2018-12-12s4:libcli: Fix error in smbcli_deltree()Tim Beale1-1/+1
Commit 094afe614b6282 fixed an uninitialized variable, which meant we tried to delete the file twice. The 2nd time fails, so the function returns an error, instead of success (even though the file is now gone). Note we want to be using the source3 SMB library code going forward. However, fixing this bug makes it easier to write tests against the (currently s4) SMB python bindings. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13676 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-11-02s4:libcli/smb2: reapply request endtimeRalph Boehme1-0/+17
tevent_req_finish() removed a possible request timeout, make sure to reinstall it. This happened when an interim SMB2 response was received. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13667 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2018-07-25s4: libcli/smb2: calculate correct credit charge for findsRalph Boehme1-0/+1
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-07-24s4:libcli: add smb_connect_nego_{send,recv}()Stefan Metzmacher3-5/+246
This can be used to create a connection up to a negotiated smbXcli_conn. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2018-07-24s4:libcli: allow a fallback to NTLMSSP if SPNEGO is not supported locallyStefan Metzmacher1-5/+30
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2018-07-24s4:libcli: add fallback_to_anonymous to smb2_connect_send()Stefan Metzmacher1-0/+32
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2018-07-24s4:libcli: allow passing an already negotiated connection to smb2_connect_send()Stefan Metzmacher1-0/+21
It will just do the session setup and tree connect steps. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2018-07-24s4:libcli: split out smb2_connect_session_start()Stefan Metzmacher1-4/+12
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2018-07-24s4:libcli: add smb2_transport_raw_init()Stefan Metzmacher1-0/+35
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2018-07-24s4:libcli: allow passing an already negotiated connection to ↵Stefan Metzmacher3-10/+40
smb_composite_connect() It will just do the session setup and tree connect steps. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2018-07-24s4:libcli: use talloc_zero() for struct smb_composite_connect in fetchfile.cStefan Metzmacher1-1/+1
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2018-07-24s4:libcli: add smbcli_transport_raw_init()Stefan Metzmacher1-0/+44
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2018-07-24s4:libcli: split out smb_raw_negotiate_fill_transport()Stefan Metzmacher1-30/+44
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2018-07-12python: Allow forced signing via smb.SMB()David Mulder1-3/+7
Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-06-28pysmb: add py_smb_unlink and testJoe Guo1-0/+24
Add unlink api to delete a file with a smb connection. Test added. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-05-12pysmb: Add some more documentation for conn.listGarming Sam1-1/+5
There are two options which are undocumented. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat May 12 04:57:29 CEST 2018 on sn-devel-144
2018-05-10samdb: Add transaction id controlGary Lockyer1-0/+1
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-04-24tevent: Fix callers of tevent_req_set_endtimeVolker Lendecke1-1/+0
tevent_req_set_endtime internally already calls tevent_req_nomem and thus sets the error status correctly. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2018-04-13libdgram: Fix an error path memleakVolker Lendecke1-0/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Apr 13 21:04:28 CEST 2018 on sn-devel-144
2018-04-13s4/libcli: python3 port for smb moduleNoel Power2-21/+40
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-03-13CVE-2018-1057: s4:dsdb/samdb: define ↵Ralph Boehme1-0/+1
DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID control Will be used to pass "user password change" vs "password reset" from the ACL to the password_hash module, ensuring both modules treat the request identical. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-02-27libdgram: Remove an unused parameterVolker Lendecke2-6/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>