summaryrefslogtreecommitdiffstats
path: root/libcli
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
* s3-winbindd: Listen on IRPC and do forwarded DNS updates on an RODCAndrew Bartlett2014-06-112-0/+279
| | | | | | Change-Id: Ib87933c318f510d95f7008e122216d73803ede68 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libcli: Add a NULL check in dom_sid_stringVolker Lendecke2014-06-101-0/+3
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jun 10 21:46:15 CEST 2014 on sn-devel-104
* libcli/security: remove sec_ace_equalDavid Disseldorp2014-05-292-33/+0
| | | | | | | | | | | This function is a duplicate of security_ace_equal(), and is no longer used. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu May 29 03:34:38 CEST 2014 on sn-devel-104
* secdesc: use security_ace_equal instead of sec_ace_equalDavid Disseldorp2014-05-291-1/+1
| | | | | | | Both offer the same functionality, sec_ace_equal() will be removed. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli/security: cleanup security_ace_equal()David Disseldorp2014-05-291-8/+20
| | | | | | | | This change cleans up the white-space damage, and converts the single line if-then statements to match Samba's coding conventions. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli/security: remove unused sec_ace_del_sid()David Disseldorp2014-05-292-33/+0
| | | | | | | With sec_desc_del_sid() now gone, this can also be removed. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli/security: remove unused sec_desc_del_sid()David Disseldorp2014-05-292-37/+0
| | | | | | | | The function is unused, and shares mostly the same behaviour as security_descriptor_acl_del(). Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli/security: remove dup_sec_acl()David Disseldorp2014-05-292-13/+0
| | | | | | | | With make_sec_desc() converted to use security_acl_dup(), which offers the same behaviour, this function is no longer needed. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli/security: clean up and fix make_sec_descDavid Disseldorp2014-05-291-48/+29
| | | | | | | | | | | | It currently leaks memory onto the provided talloc context on error, fix this. Use X_acl_dup() functions provided by secuity_descriptor.c, rather than the redundant secdesc.c calls. Also, use the IDL generated functions to calculate the security descriptor structure size. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli/secdesc: remove dup_sec_desc()David Disseldorp2014-05-282-21/+0
| | | | | | | | | With all callers converted to use security_descriptor_copy(), this function can be removed. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* libcli/secdesc: replace dup_sec_desc() usageDavid Disseldorp2014-05-281-2/+5
| | | | | | | | | Use security_descriptor_copy() instead, which is also provided by libcli. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* libcli/sd: remove redundant sec_ace_add_sid()David Disseldorp2014-05-282-27/+0
| | | | | | | | | | | | This function adds a new allow-type ACE to an existing ACE list. With the removal of sec_desc_add_sid(), this is no longer used internally. The same behaviour can be achieved via the much cleaner security_ace_create() function. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* libcli/sd: remove redundant sec_desc_add_sid()David Disseldorp2014-05-282-38/+0
| | | | | | | | | | This function adds an ACE to a security descriptor DACL. The same can be achieved via the more flexible and much cleaner security_ace_create() and security_descriptor_dacl_add() functions. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* libcli: Simplify desc_ace_has_generic()Volker Lendecke2014-05-271-9/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* libcli: Simplify desc_expand_generic()Volker Lendecke2014-05-271-13/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* libcli: Avoid an explicit memset callVolker Lendecke2014-05-271-4/+4
| | | | | | | On x86 with -O3, this saves surprising 160 bytes .text Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* libcli: Avoid a talloc/freeVolker Lendecke2014-05-271-4/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* libcli: Avoid a talloc/freeVolker Lendecke2014-05-271-4/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* libcli: Fix a memleakVolker Lendecke2014-05-271-5/+3
| | | | | | | | | | | struct security_ace has a struct dom_sid, not a pointer to it. So we don't have to talloc it first and then not free it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue May 27 12:54:55 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>
* Do not install smbclient4 and nmblookup4Jeroen Dekkers2014-04-151-1/+2
| | | | | | | | | | Change-Id: I2d91d9c9faa2df084321d10fbdc948acbd2bb735 Signed-off-by: Jeroen Dekkers <jeroen@dekkers.ch> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Tue Apr 15 03:25:13 CEST 2014 on sn-devel-104
* Typo: s/preceeded/preceded/Jelmer Vernooij2014-04-141-3/+3
| | | | | | | | | | | Caught by lintian, the Debian package linter :) Change-Id: Ia7162ea8c2b1845155345526b66d71ae64f15227 Reviewed-on: https://gerrit.samba.org/216 Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Mon Apr 14 03:51:15 CEST 2014 on sn-devel-104
* Add error codes and message descriptions for NTSTATUSNoel Power2014-04-022-0/+4238
| | | | | | | | | | | Error codes and descriptions were autogenerated from [MS-ERREF] see http://msdn.microsoft.com/en-us/library/cc704588.aspx Additionally some missing error descriptions for existing errors were identified and generated. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Use correct error code value for NT_STATUS_RPC_ENUM_VALUE_OUT_OF_RANGENoel Power2014-04-021-1/+1
| | | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Add autogenerated HRESULT error codes and descriptions from MS_ERREFNoel Power2014-04-023-2/+14741
| | | | | | | | | | | | error codes & string descriptions are generated from http://msdn.microsoft.com/en-us/library/cc704587.aspx, additionally there is a function to return the error description from the error code, this function will also try to determine the error description associated with a W_ERROR code translated as a HRESULT. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* libcli/lsarpc: add struct trustAuthInOutBlob; forward declarationStefan Metzmacher2014-04-021-0/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli/auth: s/encrypt/do_encryptStefan Metzmacher2014-04-021-6/+6
| | | | | | | This avoids compiler warnings. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli/security: s/remove/remove_ace/Stefan Metzmacher2014-04-021-3/+3
| | | | | 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>
* smbreadline: switch to new-style readline typedefGustavo Zacarias2014-03-131-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
* 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: Add warning about flow control changing macros in ntstatus.hAndrew Bartlett2014-03-051-0/+8
| | | | | | Change-Id: I49fec82e55b6bc59d5c0f157df90005f7d891c66 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libcli: Overflow array index read possible, in auth code.Ira Cooper2014-02-241-1/+1
| | | | | | | | | | | Changed the if condtion to detect when we'd improperly overflow. Coverity-Id: 1167990 Signed-off-by: Ira Cooper <ira@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Ira Cooper <ira@samba.org> Autobuild-Date(master): Mon Feb 24 11:56:38 CET 2014 on sn-devel-104
* Revert "libcli: Overflow array index read possible, in auth code."Ira Cooper2014-02-241-2/+2
| | | | | | This reverts commit 538cbfe0e90b7c7ed0f8421b323cac4dacd83f04. Signed-off-by: Ira Cooper <ira@samba.org>
* libcli: Overflow array index read possible, in auth code.Ira Cooper2014-02-241-2/+2
| | | | | | | | | | | | The values have to be signed here to allow for the values to go negative, to prevent the overflow. Coverity-Id: 1167990 Signed-off-by: Ira Cooper <ira@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Ira Cooper <ira@samba.org> Autobuild-Date(master): Mon Feb 24 07:23:03 CET 2014 on sn-devel-104
* libcli: use DBWRAP_LOCK_ORDER_NONE when opening schannel_store.tdbMichael Adam2014-02-071-1/+2
| | | | | | | Make lack of lock order checking more visible. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* dbwrap: add dbwrap_flags argument to dbwrap_local_open()Michael Adam2014-02-072-2/+3
| | | | | | | | To be consistent with db_open() and prepare for future possible extensions. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* libcli/auth: reject computer_name longer than 15 charsStefan Metzmacher2014-01-221-0/+8
| | | | | | | | This matches Windows, it seems they use a fixed size field to store netlogon_creds_CredentialState. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli/auth: don't alter the computer_name in cluster mode.Stefan Metzmacher2014-01-221-19/+3
| | | | | | | This breaks NTLMv2 authentication. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli/auth: add netlogon_creds_cli_set_global_db()Stefan Metzmacher2014-01-222-0/+12
| | | | | | | This can be used to inject a db_context from dbwrap_ctdb. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli: Fix the comment for the address.Andreas Schneider2014-01-171-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@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>
* samba:python - Py_RETURN_NONE remove compatibility code for releases < 2.4Matthias Dieter Wallnöfer2014-01-091-4/+0
| | | | | | | | | http://www.python.org/doc//current/c-api/none.html Reviewed-By: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date(master): Thu Jan 9 16:27:47 CET 2014 on sn-devel-104