summaryrefslogtreecommitdiff
path: root/source3/libads/cldap.c
AgeCommit message (Collapse)AuthorFilesLines
2025-08-13libads: change netlogon_pings() behaviour wrt to min_servers parameterRalph Boehme1-1/+1
Currently if a caller passes min_servers=X with X>1, netlogon_pings() will fail if it can't contact X DCs. This is not really what we want. What we want is: we want at least one DC, and up to X. Change implemenentation in that sense and rename the min_servers argument to wanted_servers to express this behaviour change. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15844 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Wed Aug 13 19:31:10 UTC 2025 on atb-devel-224
2024-11-11libads: Move check_cldap_reply_required_flags() to netlogon_ping.cVolker Lendecke1-53/+0
netlogon_ping.c depends on it but itself has fewer dependencies than cldap.c, so we can use it in more places Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-11-11libads: Pass "required_flags" through ads_cldap_netlogon_5()Volker Lendecke1-1/+3
... down to netlogon_pings(). Passing 0 right now, this will change for some callers Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-11-11libads: Pass "required_flags" through ads_cldap_netlogon()Volker Lendecke1-1/+3
... down to netlogon_pings() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-11-11libads: Make ads_cldap_netlogon() staticVolker Lendecke1-5/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-11-11libads: remove cldap_multi_netlogonVolker Lendecke1-282/+0
Replaced by netlogon_pings() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-11-11cldap: Use netlogon_pings()Volker Lendecke1-11/+15
Allow LDAPS for ads_cldap_netlogon() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-11-11cldap: Make cldap_netlogon.out.netlogon a pointerVolker Lendecke1-1/+1
struct netlogon_samlogon_response has subpointers, this patch enables a proper talloc hierarchy. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-10-25libads: Modernize DEBUGsVolker Lendecke1-3/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2024-10-25libads: Init a variable to NULLVolker Lendecke1-1/+1
README.Coding Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2024-10-25libads: Simplify cldap_multi_netlogon_send()Volker Lendecke1-13/+5
Save a few lines with a struct initialization Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2023-05-31s3-libads: Also handle the DS_WEB_SERVICE_REQUIRED flag in ↵Andrew Bartlett1-0/+3
check_cldap_reply_required_flags() Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2023-05-31s4-libads: Confirm newer functional levels in check_cldap_reply_required_flags()Andrew Bartlett1-0/+13
This will allow us to require that the target DC has FL 2008, 2012, 2012R2 or 2016. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-09-25s3/libads: clang: Fix Array access results in a null pointer dereferenceNoel Power1-1/+1
Fixes: source3/libads/cldap.c:400:6: warning: Array access (from variable 'responses') results in a null pointer dereference <--[clang] if (responses[0] == NULL) { ^ 1 warning generated. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-30libads: Check cldap flags in libads/ldapGarming Sam1-0/+38
Pass down request flags and check they are respected with the response flags. Otherwise, error out and pretend the connection never happened. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-10-18s3: cldap: cldap_multi_netlogon_send() fails with one bad IPv6 address.Jeremy Allison1-2/+15
Analysis by: Rebecca Gellman <rebecca@starfleet-net.co.uk> Ignore cldap_socket_init() failure when sending multiple cldap netlogon requests. Allow cldap_netlogon_send() to catch the bad address and correctly return through a tevent subreq. Make sure cldap_search_send() copes with cldap parameter == NULL. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12381 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Tue Oct 18 02:16:20 CEST 2016 on sn-devel-144
2013-02-19s3:libads: make use of samba_tevent_context_init()Stefan Metzmacher1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2011-10-17Add cldap_multi_netlogon_send/recvVolker Lendecke1-42/+296
Make ads_cldap_netlogon use it. It does not need the fancy multi stuff, but excercising that code more often is better. And because we have to ask over the network, the additional load should be neglectable. Ported to master by Stefan Metzmacher <metze@samba.org>
2011-10-10libcli/cldap: don't pass tevent_context to cldap_socket_init()Stefan Metzmacher1-1/+1
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Mon Oct 10 23:23:07 CEST 2011 on sn-devel-104
2011-04-28s3-libads Pass a struct sockaddr_storage to cldap routinesAndrew Bartlett1-10/+4
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
2010-05-31s3: only use netlogon/nbt header when needed.Günther Deschner1-0/+1
Guenther
2010-05-18s3: Remove use of iconv_convenience.Jelmer Vernooij1-1/+1
2009-07-28(Hopefully) fix the problem Kai reported withJeremy Allison1-1/+1
net ads leave and IPv6. Ensure all DC lookups prefer IPv4. Jeremy.
2009-06-08Replace the "ipv4" specific strings in libcli/cldap/cldap.c with "ip". CLDAP canJeremy Allison1-15/+6
run over IPv4/IPv6, even though some of the netlogon messages are IPv4 specific. Fix the new ads_cldap_netlogon() to be IPv6/IPv4 agnostic. This compiles but I don't have a good test env. for this (although as the previous code was *completely* broken over IPv6 this will expose previously hidden bugs if it's broken :-). Jeremy.
2009-04-28s3-cldap: check for zero ip address in ads_cldap_netlogon().Günther Deschner1-0/+7
Guenther
2009-03-19s3:libads: use libcli/cldap codeStefan Metzmacher1-229/+67
metze
2008-12-31Replace a static variable and alarm() calls by using sys_select()Volker Lendecke1-23/+24
Günther, please check!
2008-12-31Fix some nonempty blank linesVolker Lendecke1-5/+5
2008-10-22s3-asn1: make all of s3 asn1 code do a proper asn1_init() first.Günther Deschner1-68/+79
Guenther
2008-10-22s3: use shared asn1 code.Günther Deschner1-4/+4
Guenther
2008-10-02The IRIX compiler does not like embedded unnamed unionsVolker Lendecke1-1/+1
2008-09-24s3-nbt: use the new generated nbt.Günther Deschner1-98/+19
Guenther
2008-09-23s3: fix NETLOGON_NT_VERSION version flags.Günther Deschner1-10/+10
Guenther
2008-09-23s3: use samba4 prototype for ndr_push/pull_struct_blob.Günther Deschner1-1/+1
Guenther
2008-06-05mailslot: always pull a command 25 type reply.Günther Deschner1-0/+1
Guenther (This used to be commit 1ce726b951621cb4b34069c31d1318fc04ad2389)
2008-05-09dsgetdcname: make use of nbt_cldap_netlogon_15.Günther Deschner1-1/+1
Guenther (This used to be commit 5b0eda98f3d127399770f7a037ad3277dbe23393)
2008-05-09cldap: move out cldap object to fix the build.Günther Deschner1-0/+84
Guenther (This used to be commit 56be9c98d24e64bf855439df21766d30f448f407)
2008-05-09cldap: let ads_cldap_netlogon() return all possible cldap replies.Günther Deschner1-14/+55
Guenther (This used to be commit 6f9d5e1cc94bc90685b54c04622b8f3357bd2f69)
2008-05-06mailslot/cldap: use nt_version bits in queries.Günther Deschner1-1/+2
Guenther (This used to be commit b261f063125f8454d8f4e8f6b6f8aa5bc393ea34)
2008-04-21cldap: add talloc context to ads_cldap_netlogon().Günther Deschner1-4/+9
Guenther (This used to be commit 4cee7b1bd5cd97c414b73d6f39238958480cdcf3)
2008-04-21libads: Use libnbt for CLDAP reply parsing.Günther Deschner1-93/+12
Guenther (This used to be commit 751f3064a508341c0ebae45e8de9f5311d915d70)
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison1-1/+1
bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r22844: Introduce const DATA_BLOB data_blob_null = { NULL, 0, NULL }; andVolker Lendecke1-4/+4
replace all data_blob(NULL, 0) calls. (This used to be commit 3d3d61687ef00181f4f04e001d42181d93ac931e)
2007-10-10r21755: Memory leak fixes from Zack Kirsch <zack.kirsch@isilon.com>.Jeremy Allison1-2/+7
Jeremy. (This used to be commit 02d08ca0be8c374e30c3c0e665853fa9e57f043a)
2007-10-10r18175: Forgot to call asn1_free() in previous commit.Günther Deschner1-0/+1
Guenther (This used to be commit af3779a51624977088c322ac98f52c02e9291b54)
2007-10-10r18174: Do not return "success" when we failed to write in the CLDAP code.Günther Deschner1-0/+1
Guenther (This used to be commit 1fe4724f57f4f25ed486240cb1e741da60f0c997)
2007-10-10r18162: Close socket when the CLDAP request has failed.Günther Deschner1-0/+1
Guenther (This used to be commit 714ea3ceab714e23e97eb3e4d7261456a18abbac)
2007-10-10r18010: Ensure we don't timeout twice to the sameJeremy Allison1-1/+3
server in winbindd when it's down and listed in the -ve connection cache. Fix memory leak, reduce timeout for cldap calls - minimum 3 secs. Jeremy. (This used to be commit 10b32cb6de234fa17fdd691bb294864d4d40f782)