1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

34 Commits

Author SHA1 Message Date
Michael Adam
c150234495 s4:libcli:resolve: fix O3 error unused result of write
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
2016-05-13 00:16:15 +02:00
Andreas Schneider
7f00fcf558 addns: Remove support for dns_host_file.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-12-18 06:47:40 +01:00
Volker Lendecke
f77c3a65db libcli: Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-07-31 18:49:46 +02:00
Landon Fuller
6dfb35f3ff Fallback to the internal resolver on EAI_FAIL.
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-02-17 07:06:36 +01:00
Arvid Requate
bdc172aca5 s4-resolve: Fix parsing of IPv6/AAAA in dns_lookup (bug #9555)
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-12 10:32:28 +01:00
Alexander Bokovoy
f32d43763d dns: fix comments and make s4/libcli/resolve dns resolver working
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-23 17:51:49 +03:00
Simo Sorce
c54fe86a63 s4-resolve: Remove dependency on libroken
Use available native samba resolver functions
2012-05-23 17:51:49 +03:00
Andrew Bartlett
079d1572c2 s4-resolv: fix dns_ex so as to fail correctly when a name does not exist
Without this, netbios name lookups do not work, as we never fall back to them.

This caused segfaults from e38d97e042 to
251209bd6f 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-14 01:16:37 +01:00
Matthieu Patou
059523e203 s4-resolver: do not use all the A and AAAA records, those after a NS are not the one we want to use 2011-12-05 18:23:08 +01:00
Matthieu Patou
2a8650ed79 s4-resolver: fix bug with DNS servers returning AAAA records when asked for 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-06 03:18:00 +01:00
Matthieu Patou
251209bd6f s4-resolver: make it work back with ipv4 only DNS records
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-11-02 11:15:34 +01:00
Matthieu Patou
e38d97e042 s4-resolv: fix resolution of SRV records pointing to A and AAAA records 2011-10-21 22:29:09 +02:00
Simo Sorce
ab81505e08 s4:libcli: use tevent_ fn names instead of legacy event_ ones 2011-08-13 09:54:15 -04:00
Andrew Bartlett
a1f04e8abc libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbol
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-20 08:12:03 +02:00
Andrew Tridgell
285293c8b5 s4-ipv6: fixed a crash in the IPv6 DNS code 2011-06-07 15:48:42 +10:00
Andrew Tridgell
64380ff050 s4-ipv6: fixed DNS handling with new IPv6 code 2011-06-07 12:55:37 +10:00
Andrew Tridgell
d1c90c465e s4-ipv6: cope with IPv6 in our async DNS client code 2011-06-06 12:26:11 +10:00
Luke Howard
c31f95f66d do an explicit A record search for SRV entries
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-05-13 18:50:23 +02:00
Matthias Dieter Wallnöfer
01c3cb260c s4:libcli/resolve/dns_ex.c - fix "const" warning 2010-10-03 12:05:13 +02:00
Andrew Tridgell
8edf3d7131 s4-dns: avoid search domains expansion in DNS resolver
add a '.' if the name contains a '.' already, but not at the end
2010-09-27 23:18:23 +00:00
Andrew Tridgell
fa7fd4f261 s4-dns: fixed lookup of SRV records using dns_ex
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-15 15:39:35 +10:00
Andrew Tridgell
2d30f4fb4f s4-dns-ex: use autoclose on the dns child pipe
I'm hoping this will fix an occasional segfault I've noticed where
epoll still calls events on a closed fde

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-03-05 11:54:36 +11:00
Kamen Mazdrashki
a2044b9a61 s4: Fix result check for getaddrinfo()
I think this completes commit 50feca550e.
Now result should be handled correctly both for systems that
support EAI_NODATA but returns EAI_NONAME (as my Ubuntu 9.x)
and systems that doesn't support EAI_NODATA at all.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-01-06 14:26:32 +01:00
Andrew Tridgell
294e7cd566 s4/libcli: when we get a DNS lookup failure show the name
When tracking down complex connection problems its useful knowing what
name lookups failed.
2009-09-11 14:07:18 +10:00
Andrew Bartlett
9b261c008a s4:heimdal: import lorikeet-heimdal-200906080040 (commit 904d0124b46eed7a8ad6e5b73e892ff34b6865ba)
Also including the supporting changes required to pass make test

A number of heimdal functions and constants have changed since we last
imported a tree (for the better, but inconvenient for us).

Andrew Bartlett
2009-06-12 07:45:48 +10:00
Stefan Metzmacher
9c387c189e s4:resolve/dns_ex: undefine class because it's used in heimdal/lib/roken/resolve.h
metze
2009-02-02 13:09:08 +01:00
Tim Prouty
d217bd00a1 s4: simplify some overly-complicated logic 2008-12-30 15:21:34 -08:00
Stefan Metzmacher
183c379fe5 s4:lib/tevent: rename structs
list=""
list="$list event_context:tevent_context"
list="$list fd_event:tevent_fd"
list="$list timed_event:tevent_timer"

for s in $list; do
	o=`echo $s | cut -d ':' -f1`
	n=`echo $s | cut -d ':' -f2`
	r=`git grep "struct $o" |cut -d ':' -f1 |sort -u`
	files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4`
	for f in $files; do
		cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp
		mv $f.tmp $f
	done
done

metze
2008-12-29 20:46:40 +01:00
Tim Prouty
50feca550e s4: Fix a getaddrinfo/EAI_NODATA portability issue
FreeBSD has explicitly deprecated EAI_NODATA as a return value from
getaddrinfo by removing it from netdb.h.  On systems that don't have
EAI_NODATA, EAI_NONAME should be used instead.
2008-12-22 15:15:16 -08:00
Stefan Metzmacher
a60159c873 s4:libcli/replace: add some RESOLVE_NAME_FLAG* flags
metze
2008-12-18 13:32:50 +01:00
Stefan Metzmacher
116fbd6b5a s4:libcli/resolve: specify the port for the resulting socket_addresses
metze
2008-12-17 20:28:40 +01:00
Stefan Metzmacher
7d0e78a52c s4:libcli/resolve: optionally return the name that belongs to the returned address
E.g. this helps for DNS CNAME and SRV results.

metze
2008-12-17 20:26:38 +01:00
Stefan Metzmacher
937fdb8a7e s4:libcli/resolve: pass down flags to the resolver backends
metze
2008-12-17 20:25:52 +01:00
Stefan Metzmacher
9492f0f00f s4:libcli/resolve: add getaddrinfo()/dns_looup() resolving
This "dns_ex" module provides flexible lookup methods
for dns lookups.

The getaddrinfo() part looks at /etc/hosts and dns.
As it handles CNAME replies badly we fallback
to use dns_lookup(name, "A").

The dns_lookup() makes DNS SRV lookups possible.

This module is not a real resolve module, it's just
a generic helper as the nbtlist.c code is.

The next step will be that the "host" module will
use the dns_ex.c code.

metze
2008-12-17 19:12:26 +01:00