summaryrefslogtreecommitdiff
path: root/libcli
Commit message (Collapse)AuthorAgeFilesLines
* smbd: Add make_smb2_posix_create_ctx()Volker Lendecke2020-02-073-0/+89
| | | | | | | | Will be used internally to pass an artificial posix create context into VFS_CREATE_FILE from the SMB1 unix extension calls Pair programmed with: Jeremy Allison <jra@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org>
* libsmb: Add smb2_create_blob_remove()Volker Lendecke2020-02-072-0/+17
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmb: Allow passing in NULL to smb2_create_blob_find()Volker Lendecke2020-02-071-0/+4
| | | | | | | | Will simplify callers a bit, and it does not change semantics significantly. Zero create blobs won't find anything anyway. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmb: Add posix create context definitionVolker Lendecke2020-02-071-0/+1
| | | | | Pair programmed with: Jeremy Allison <jra@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org>
* libsmb: Add required #includes to smb_util.hVolker Lendecke2020-02-071-0/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmb: Add required includes to smb2_create_blob.hVolker Lendecke2020-02-071-0/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmb: Remove "const" from smb_create_blob->tagVolker Lendecke2020-02-071-1/+1
| | | | | | | I want to TALLOC_FREE that soon, and we do a talloc_strdup into this anyway. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libcli:smb: Don't use forward declartions for GnuTLS typedefsStefan Metzmacher2020-02-072-9/+15
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14271 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Feb 7 13:48:27 UTC 2020 on sn-devel-184
* libcli/nbt: avoid talloc_reference() in nbt_name_*_send()Stefan Metzmacher2020-02-051-4/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libcli:smb: Improve check for gnutls_aead_cipher_(en|de)cryptv2Andreas Schneider2020-02-041-5/+2
| | | | | | | | | | | | | | | This is available since version 3.6.10, but 3.6.10 has a bug which got fixed in 3.6.11, see: https://gitlab.com/gnutls/gnutls/-/merge_requests/1085 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14250 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Feb 4 06:44:00 UTC 2020 on sn-devel-184
* libsmb: Fix a typoVolker Lendecke2020-01-301-1/+1
| | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libcli: Align integer typesVolker Lendecke2020-01-301-1/+1
| | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* auth: Avoid casts in ntlm_check.cVolker Lendecke2020-01-061-16/+15
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Autobuild-User(master): Gary Lockyer <gary@samba.org> Autobuild-Date(master): Mon Jan 6 03:12:20 UTC 2020 on sn-devel-184
* auth: Check for talloc failure in smb_sess_key_ntlmv2()Volker Lendecke2020-01-061-0/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* auth: Slightly simplify smb_pwd_check_ntlmv1()Volker Lendecke2020-01-061-11/+13
| | | | | | | Do an early return for the failure case Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* auth: Check for talloc failure in smb_pwd_check_ntlmv1()Volker Lendecke2020-01-061-0/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* auth: Slightly simplify smb_pwd_check_ntlmv2()Volker Lendecke2020-01-061-15/+17
| | | | | | | Do an early return for the failure case Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* auth: Check for talloc failure in smb_pwd_check_ntlmv2()Volker Lendecke2020-01-061-0/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* lib: Remove an unused variable from security_token_debug()Volker Lendecke2020-01-031-8/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* smbdes: remove old unused DES builtin-cryptoIsaac Boukris2019-12-103-271/+0
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* sess_crypt_blob can only crypt blobs whose size divides by 8Isaac Boukris2019-12-101-3/+6
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* session: convert sess_crypt_blob to use gnutlsIsaac Boukris2019-12-103-14/+39
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* smbdes: convert des_crypt112_16 to use gnutlsIsaac Boukris2019-12-105-22/+69
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* smbdes: convert des_crypt112 to use gnutlsIsaac Boukris2019-12-104-11/+32
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* smbdes: convert E_old_pw_hash to use gnutlsIsaac Boukris2019-12-103-5/+13
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* smbdes: convert des_crypt128() to use gnutlsIsaac Boukris2019-12-104-6/+18
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* smbdes: convert E_P24() and SMBOWFencrypt to use gnutlsIsaac Boukris2019-12-105-21/+49
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* smbdes: remove D_P16() (not used)Isaac Boukris2019-12-102-7/+0
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* smbdes: convert E_P16() to use gnutlsIsaac Boukris2019-12-104-6/+19
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* smbdes: convert sam_rid_crypt() to use gnutlsIsaac Boukris2019-12-105-16/+57
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* SMBsesskeygen_lm_sess_key: use gnutls and return NTSTATUSIsaac Boukris2019-12-103-7/+18
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* netlogon_creds_des_encrypt/decrypt_LMKey: use gnutls and return NTSTATUSIsaac Boukris2019-12-102-11/+31
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* smbdes: add des_crypt56_gnutls() using DES-CBC with zeroed IVIsaac Boukris2019-12-104-1/+71
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: test sess_crypt_blobIsaac Boukris2019-12-101-0/+29
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: test SMBsesskeygen_lm_sess_keyIsaac Boukris2019-12-101-0/+23
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: test des_crypt112_16Isaac Boukris2019-12-101-0/+26
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: test des_crypt112 and fix (unused) decryptionIsaac Boukris2019-12-102-2/+31
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: test des_crypt128Isaac Boukris2019-12-101-0/+20
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: test E_old_pw_hashIsaac Boukris2019-12-101-0/+22
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: test E_P24 and SMBOWFencryptIsaac Boukris2019-12-101-0/+44
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: test sam_rid_cryptIsaac Boukris2019-12-101-0/+23
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: test E_P16Isaac Boukris2019-12-101-0/+20
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli/auth: test des_crypt56() and add test_gnutls to selftestIsaac Boukris2019-12-102-0/+25
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* auth:tests: Only enable torture_gnutls_aes_128_cfb() on GnuTLS >= 3.6.11Andreas Schneider2019-12-101-2/+2
| | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* auth:tests: Improve debug output of test_gnutlsAndreas Schneider2019-12-101-2/+8
| | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* build: libcli/http does not need samba3core, only gensecVolker Lendecke2019-12-081-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* build: Do not build selftest binaries for builds without --enable-selftestAndrew Bartlett2019-11-225-20/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new for_selftest option to SAMBA_BINARY() and SAMBA3_BINARY() This allows us to be much more consistent (at least in the core Samba) and documents clearly why the binary should not be installed. Not modified are - test_lp_load - notifyd-tests - gendrandperf - test* from examples/libsmbclient - dbwrap_torture - split_tokens - locktest2 - msgtest - msg_sink - msg_source - versiontest - rpc_open_tcp - test_headers As these are not tested in selftest so any change would also be untested. Of course they probably should be added in a different MR. Also not modified (because they are not tests, nor part of the build system) are: - smb2mount - notifydd - log2pacp - debug2html - smbfilter - destroy_netlogon_creds_cli - spotlight2* - tevent_glib_tracker These do however appear to be untested. For now, the source4 forked client tools are left unchanged: - smbclient4 - nmblookup4 Finally, the heimdal binaries are left as install=False as they are either part of the build system or end-user tools that we just don't want to install. These are however tested. The motivation is commit like c34ec003b7d45aa4196ff93a0ac29694b25e5309 and da87fa998ab71328f30bcdf5b41aee8675aee48a, which are both totally correct but are not needed if the selftest is not run on MacOS. There are likely other platforms or build environments where building our test binaries is more pain than valuable, see for example also https://lists.samba.org/archive/samba/2019-November/227137.html Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Isaac Boukris <iboukris@samba.org> Autobuild-User(master): Isaac Boukris <iboukris@samba.org> Autobuild-Date(master): Fri Nov 22 11:48:59 UTC 2019 on sn-devel-184
* libcli:auth: Remove unused E_md5hash()Andreas Schneider2019-11-192-41/+0
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14195 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib: Fix an error path memleak in schannel_get_creds_state()Volker Lendecke2019-11-141-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libcli:auth Check return code of netlogon_creds_aes_encrypt()Andrew Bartlett2019-11-142-7/+21
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14195 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Nov 14 09:25:36 UTC 2019 on sn-devel-184