summaryrefslogtreecommitdiff
path: root/source4/libcli/resolve
AgeCommit message (Collapse)AuthorFilesLines
2023-08-14s4:libcli: Fix code spellingAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2022-11-09s4: libcli: Ignore errors when getting A records after fetching AAAA records.Jeremy Allison1-6/+8
The target may only be available over IPv6. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15226 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Nov 9 20:34:07 UTC 2022 on sn-devel-184
2020-09-15lib: addns: Fix ads_dns_lookup_srv() and functions to return size_t * num ↵Jeremy Allison1-4/+11
servers. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Noel Power <npower@samba.org>
2020-09-15libcli: nbt: Fix resolve_lmhosts_file_as_sockaddr() to return size_t * count ↵Jeremy Allison1-1/+1
of addresses. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Noel Power <npower@samba.org>
2020-08-28lib/util: remove extra safe_string.h fileMatthew DeVore1-0/+2
lib/util/safe_string.h is similar to source3/include/safe_string.h, but the former has fewer checks. It is missing bcopy, strcasecmp, and strncasecmp. Add the missing elements to lib/util/safe_string.h remove the other safe_string.h which is in the source3-specific path. To accomodate existing uses of str(n?)casecmp, add #undef lines to source files where they are used. Signed-off-by: Matthew DeVore <matvore@google.com> Reviewed-by: David Mulder <dmulder@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Aug 28 02:18:40 UTC 2020 on sn-devel-184
2020-08-04s3/s4: Cleanup. Move TALLOC_CTX * parameter to be first in ↵Jeremy Allison1-2/+6
resolve_lmhosts_file_as_sockaddr() to match modern conventions. No logic changes. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Isaac Boukris <iboukris@samba.org>
2020-08-03lib: relicense smb_strtoul(l) under LGPLv3Ralph Boehme1-0/+1
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Aug 3 22:21:04 UTC 2020 on sn-devel-184
2020-05-08Fix clang 9 for-loop-analysis warningsGary Lockyer1-2/+1
Review-note: The for loop increment operation was changed and the trailing i++ was removed from the loop body. The resulting for statement is equivalent to the original Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri May 8 11:16:18 UTC 2020 on sn-devel-184
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-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-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>
2018-01-23libcli/resolve: Make functions staticVolker Lendecke1-9/+10
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 Jan 23 06:36:36 CET 2018 on sn-devel-144
2018-01-23libcli/resolve: Make functions staticVolker Lendecke1-9/+10
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2018-01-23libcli/resolve: Fix typosVolker Lendecke1-2/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2016-05-13s4:libcli:resolve: fix O3 error unused result of writeMichael Adam1-2/+3
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
2016-02-06dlist: remove unneeded type argument from DLIST_ADD_END()Michael Adam1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-12-18s4-libcli: Remove obsolete support for file resolving.Andreas Schneider2-162/+0
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-12-18addns: Remove support for dns_host_file.Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-07-31libcli: Fix a typoVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2014-04-02s4:libcli/tests: add missing #include "torture/local/proto.h"Stefan Metzmacher1-0/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02s4:libcli/resolve: avoid some const warningsStefan Metzmacher2-4/+5
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-31s4-resolve: Add lmhosts support into the source4 name resolve codeAndrew Bartlett2-0/+131
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-17s4-nbt: Ensure source4/ nbt client and server honour 'disable netbios'Andrew Bartlett1-2/+6
Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sun Feb 17 11:25:34 CET 2013 on sn-devel-104
2013-02-17Fallback to the internal resolver on EAI_FAIL.Landon Fuller1-1/+3
On Linux, non-RFC 1034-complaint names (such as gc._msdsc.example.org) will result in the resolver returning the non-POSIX EAI_NODATA. In that case, the case statement here would fall back on the internal resolver, allowing resolution to complete successfully. On FreeBSD, the libc resolver uses the same validation code, but the POSIX result of EAI_FAIL is returned instead of EAI_NODATA. Since there was no case for this error code, no fallback to the internal resolver would occur. This led to replication failing on FreeBSD. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sun Feb 17 07:06:36 CET 2013 on sn-devel-104
2013-01-12s4-resolve: Fix parsing of IPv6/AAAA in dns_lookup (bug #9555)Arvid Requate1-0/+1
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-05-23dns: fix comments and make s4/libcli/resolve dns resolver workingAlexander Bokovoy1-1/+1
After migrating to use libaddns, reply_to_addrs() needed to change the way answers are iterated through. Originally libroken implementation gave all answers as separate records with last one being explicitly NULL. libaddns unmarshalling code gives all non-NULL answers and should be iterated with explicit reply->num_answers in use.
2012-05-23s4-resolve: Remove dependency on librokenSimo Sorce1-197/+152
Use available native samba resolver functions
2011-12-14s4-resolv: fix dns_ex so as to fail correctly when a name does not existAndrew Bartlett1-0/+9
Without this, netbios name lookups do not work, as we never fall back to them. This caused segfaults from e38d97e0424f7e5b21c8b7ac0b1f1bac33f19d69 to 251209bd6f6e66ca9bcf28cd652d85d1cd729fdc and then name lookup failure or timeouts until this patch. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Dec 14 01:16:37 CET 2011 on sn-devel-104
2011-12-05s4-resolver: do not use all the A and AAAA records, those after a NS are not ↵Matthieu Patou1-0/+16
the one we want to use
2011-11-06s4-resolver: fix bug with DNS servers returning AAAA records when asked for ↵Matthieu Patou1-2/+4
A records Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Sun Nov 6 03:18:00 CET 2011 on sn-devel-104
2011-11-02s4-resolver: make it work back with ipv4 only DNS recordsMatthieu Patou1-16/+25
It turns out that if there is no AAAA record the dns server (bind and MS windows at least) do not return the A record when just asked for AAAA. Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Wed Nov 2 11:15:34 CET 2011 on sn-devel-104
2011-10-21s4-resolv: fix resolution of SRV records pointing to A and AAAA recordsMatthieu Patou1-161/+238
2011-09-28s4:libcli/resolve: only try broadcast messages to ipv4 addressesStefan Metzmacher1-2/+12
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Sep 28 05:10:53 CEST 2011 on sn-devel-104
2011-08-13s4:libcli: use tevent_ fn names instead of legacy event_ onesSimo Sorce1-1/+1
2011-06-20libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbolAndrew Bartlett1-2/+2
The two error tables need to be combined, but for now seperate the names. (As the common parts of the tree now use the _common function, errmap_unix.c must be included in the s3 autoconf build). Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Mon Jun 20 08:12:03 CEST 2011 on sn-devel-104
2011-06-07s4-ipv6: fixed a crash in the IPv6 DNS codeAndrew Tridgell1-1/+1
2011-06-07s4-ipv6: fixed DNS handling with new IPv6 codeAndrew Tridgell1-1/+16
2011-06-06s4-ipv6: allow for IPv6 in resolver top level callsAndrew Tridgell1-4/+2
2011-06-06s4-ipv6: cope with IPv6 in our async DNS client codeAndrew Tridgell1-28/+28
2011-06-06s4-ipv6: update callers to load_interface_list()Andrew Tridgell2-2/+2
2011-05-13do an explicit A record search for SRV entriesLuke Howard1-4/+22
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-05-08s4-interfaces Rename interfaces code so not to conflict with source3/Andrew Bartlett2-4/+4
The iface_count, iface_n_bcast, and load_interfaces functions conflicted with functions of the same name in source3, so the source4 functions were renamed. Hopefully we can actually wrap one around the other in future. Andrew Bartlett
2011-05-03s4-libcli Remove resolve_name() as it conflicts with Samba3.Andrew Bartlett1-12/+0
This was just a wrapper around resolve_name_ex(), so just call that instead. Andrew Bartlett
2010-12-11s4-smbtorture: Make test names lowercase and dot-separated.Jelmer Vernooij1-1/+1
This is consistent with the test names used by selftest, should make the names less confusing and easier to integrate with other tools. Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Dec 11 04:16:13 CET 2010 on sn-devel-104
2010-10-03s4:libcli/resolve/dns_ex.c - fix "const" warningMatthias Dieter Wallnöfer1-1/+2
2010-09-27s4-dns: avoid search domains expansion in DNS resolverAndrew Tridgell1-0/+8
add a '.' if the name contains a '.' already, but not at the end
2010-09-24s4:libcli/resolve/file.c - fix "const" warningMatthias Dieter Wallnöfer1-1/+1
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-09-15s4-resolve: the file backend should not look at the name typeAndrew Tridgell1-1/+1
this matches the behaviour of our DNS resolver Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-15s4-resolve: added resolve_name_multiple_recv()Andrew Tridgell1-0/+34
this allows for multiple replies to a SRV lookup Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>