summaryrefslogtreecommitdiffstats
path: root/source3/libads/ldap.c
Commit message (Collapse)AuthorAgeFilesLines
* addns: Remove support for dns_host_file.Andreas Schneider2014-12-181-5/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3-libads: remove unused dn from ads_get_service_principal_names().Günther Deschner2014-11-281-7/+0
| | | | | | | | | | 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): Fri Nov 28 16:46:20 CET 2014 on sn-devel-104
* s3:libads: avoid some compiler warnings in ldap.cStefan Metzmacher2014-11-251-15/+19
| | | | | | | | We use helper variables and explicit casts using discard_const_p() to avoid bogus const warnings. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* samba: pass down size_t instead of int to add_string_to_array().Günther Deschner2014-11-171-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
* s3-libads: Add function to search for an element in an array.Andreas Schneider2014-09-261-0/+31
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=9984 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3-libads: Add a function to retrieve the SPNs of a computer account.Andreas Schneider2014-09-261-0/+60
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=9984 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3-libads: allow ads_try_connect() to re-use a resolved ip address.Günther Deschner2014-04-171-18/+26
| | | | | | | | | | | | Pass down a struct sockaddr_storage to ads_try_connect. 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): Thu Apr 17 19:56:16 CEST 2014 on sn-devel-104
* Remove special socket_wrapper code.Andreas Schneider2014-04-171-32/+0
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-libads: Use ldap_initialize() if available.Andreas Schneider2014-04-171-5/+20
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-libads: Use the IP instead of the name.Bjoern Baumbach2014-03-131-1/+1
| | | | | | | | | | | Thix fixes 'net rpc join' against ADS. Signed-off-by: Bjoern Baumbach <bb@sernet.de> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Thu Mar 13 17:06:00 CET 2014 on sn-devel-104
* s3: ldap client can return NT_STATUS_OK when an error occurs in a paged search.Daniel Liberman2014-01-231-4/+7
| | | | | | | | | | | | | | | | | | | | | | "Inside ads_do_search_all_args(), if the first call to ads_do_paged_search_args() fails, the proper error status is returned. But, if the execution is already inside the loop to get all the accounts doing several calls to ads_do_paged_search_args(), and one of these calls times out, the status returned is from the *first* call, so success. This causes net_ads_search() to interpret the return from ads_do_search_retry() as success and print all the accounts returned, but it’s only a subset." Also ensure we free previously returned results on error in subsequent fetches. https://bugzilla.samba.org/show_bug.cgi?id=10387 Reviewed-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 Jan 23 01:40:54 CET 2014 on sn-devel-104
* Add a talloc context to sitename_fetch().Jeremy Allison2013-09-051-9/+6
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3-libads: Print the debug string of a failed call with LDAP_OTHER.Andreas Schneider2013-06-121-0/+18
| | | | | | | | | 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): Wed Jun 12 13:46:57 CEST 2013 on sn-devel-104
* BUG 9699: Fix adding case sensitive spn.Andreas Schneider2013-04-031-12/+2
| | | | | | | | | | | | We should be able to define the case of the spn cause it is important for some services like nfs. 'net ads keytab add "nfs"' should not result in an uppercase spn. 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): Wed Apr 3 23:57:32 CEST 2013 on sn-devel-104
* s3-smbldap: use smbldap_ prefixed functionsAlexander Bokovoy2012-09-071-1/+1
|
* Correctly check for errors in strlower_m() returns.Jeremy Allison2012-08-091-3/+12
|
* Check error returns from strupper_m() (in all reasonable places).Jeremy Allison2012-08-091-3/+15
|
* lib/param: Move all enum declarations to lib/paramAndrew Bartlett2012-07-241-0/+1
| | | | | | | | This is in preperation for the parameter table being made common. Andrew Bartlett Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
* s3-libads: Use a reducing page size to try and cope with a slow LDAP serverAndrew Bartlett2012-05-261-2/+2
| | | | | | | | | If we cannot get 1000 users downloaded in 15seconds, try with 500, 250 and then 125 users at a time. Andrew Bartlett Signed-off-by: Jeremy Allison <jra@samba.org>
* Move source3/libads/dns.c to lib/addnsSimo Sorce2012-05-231-1/+1
|
* s3-ads-dns: Break dependency on lp_parmSimo Sorce2012-05-231-1/+4
| | | | In preparation of making this code common to s3 and s4
* s3-libads: Remove unused ads_pull_sids_from_extendeddn()Andrew Bartlett2012-02-231-55/+0
| | | | | | Found by callcatcher. Andrew Bartlett
* If "ldap timeout" is non-zero, set the local search timeout toJeremy Allison2011-08-191-19/+36
| | | | | | | | | be one second longer than the remote search timeout (which is set to the "ldap timeout" value). This allows the remote search timeout to fire in preference. Allow lp_ldap_timeout() to be zero. Don't set the any local alarm if so.
* s3: Increase a debug level in ads_find_dcVolker Lendecke2011-08-171-1/+2
| | | | | This message can happen with AD trusts that winbind can not cope with. The message is not really clear and not worth spamming syslog always.
* s3-param Remove special case for global_myname(), rename to lp_netbios_name()Andrew Bartlett2011-06-091-6/+6
| | | | | | | | There is no reason this can't be a normal constant string in the loadparm system, now that we have lp_set_cmdline() to handle overrides correctly. Andrew Bartlett
* s3-talloc Change TALLOC_MEMDUP() to talloc_memdup()Andrew Bartlett2011-06-091-1/+1
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_MEMDUP isn't standard talloc.
* s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()Andrew Bartlett2011-06-091-5/+5
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_ARRAY isn't standard talloc.
* s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett2011-06-091-2/+2
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
* s3-talloc Change TALLOC_ARRAY() to talloc_array()Andrew Bartlett2011-06-091-2/+2
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ARRAY isn't standard talloc.
* s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()Andrew Bartlett2011-06-091-2/+2
| | | | | | | Using the standard macro makes it easier to move code into common, as TALLOC_REALLOC_ARRAY isn't standard talloc. Andrew Bartlett
* s3-param prepare for some lp_ functions to return constAndrew Bartlett2011-06-011-1/+1
|
* s3-lib Replace StrCaseCmp() with strcasecmp_m()Andrew Bartlett2011-05-181-1/+1
| | | | | | | strcasecmp_m() never needs to call to talloc, and via next_codepoint() still has an ASCII fast-path bypassing iconv() calls. Andrew Bartlett
* More simple const fixups.Jeremy Allison2011-05-051-6/+6
|
* s3-libads Move variables into if (socket_wrapper_dir()) where they are used.Andrew Bartlett2011-04-291-4/+4
|
* s3-libads: Use ldap_init_fd() to connect to AD server in socket_wrapperAndrew Bartlett2011-04-281-1/+35
| | | | | | | | | | | | | | | | This means that we control the connection setup, don't rely on signals for timeouts and the connection uses socket_wrapper where that is required in our test environment. According to bug reports, this method is also used by curl and other tools, so we are not the first to (ab)use the OpenLDAP libs in this way. It is ONLY enabled for socket_wrapper at this time, as this is the best way to get 'make test' working for S3 winbind tests in an S4 domain. Andrew Bartlett
* s3-libads Pass a struct sockaddr_storage to cldap routinesAndrew Bartlett2011-04-281-30/+11
| | | | | | | This avoids these routines doing a DNS lookup that has already been done, and ensures that the emulated DNS lookup isn't thrown away. Andrew Bartlett
* s3-libads Don't start a DEBUG with 'time'Andrew Bartlett2011-04-271-1/+1
| | | | | | This strange requirement comes from our subunit test harness. Andrew Bartlett
* s3-libads Remove KRB5_DNS_HACKAndrew Bartlett2011-04-261-12/+0
| | | | | | | We have winbindd write a custom krb5.conf or use a kdc locator plugin to do this properly now. Andrew Bartlett
* s3: Fix Coverity ID 2336, NULL_RETURNSVolker Lendecke2011-04-221-0/+4
|
* Quite some callers of sid_split_rid do not care about the ridVolker Lendecke2011-03-101-2/+1
|
* libcli/security Provide a common, top level libcli/security/security.hAndrew Bartlett2010-10-121-0/+1
| | | | | | | | | | | | | | This will reduce the noise from merges of the rest of the libcli/security code, without this commit changing what code is actually used. This includes (along with other security headers) dom_sid.h and security_token.h Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
* s3-libads call common GUID_from_ndr_blob()Andrew Bartlett2010-09-201-19/+17
| | | | | | | | | This does a length-limited check, and so avoids reading beyond the allocated memory if the server sends less than 16 bytes. Andrew Bartlett Signed-off-by: Günther Deschner <gd@samba.org>
* s3-build: only include smbldap.h where needed.Günther Deschner2010-09-201-0/+1
| | | | Guenther
* Fix all sid_parse returns to be checked. Tidy up some checks and errorJeremy Allison2010-09-151-1/+3
| | | | | | messages. Jeremy.
* s3/libads: use monotonic clock for ldap connection timeoutsBjörn Jacke2010-09-071-1/+1
|
* s3: avoid global include of ads.h.Günther Deschner2010-08-051-0/+1
| | | | Guenther
* s3-libads: only include libds flags where needed.Günther Deschner2010-07-011-0/+1
| | | | Guenther
* s3-libads: move ads_dns out of main includes.Günther Deschner2010-07-011-0/+1
| | | | Guenther
* s3-libads: use shared well known guids.Günther Deschner2010-07-011-1/+1
| | | | Guenther
* s3: only use netlogon/nbt header when needed.Günther Deschner2010-05-311-0/+1
| | | | Guenther