1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-07 17:18:11 +03:00
Commit Graph

103 Commits

Author SHA1 Message Date
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
Andrew Tridgell
fae84f98e3 libutil: moved the networking defines to util_net.h
These were causing thousands of warnings on solaris8
2010-03-26 17:36:02 +11:00
Andrew Bartlett
1af2cd2bd1 s4:libcli/resovle File based lookup module for DNS name types
This uses the new common code to read a file containing DNS host
names, so we don't have to use real DNS lookups in our test
environment.

Andrew Bartlett
2010-03-11 11:27:48 +11:00
Andrew Bartlett
9457b7ea22 s4:libcli/resolve Use a more robust way to return the string address
By going via these tevent functions, we avoid needing to dereference
the struct socket_address, which may contain a 'struct sockaddr' or
strings.  The new dns_host_file resolver returns in the form of a
struct sockaddr.

Andrew Bartlett
2010-03-11 11:27:47 +11: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
92786aebf1 s4-resolve: fixed a crash bug on timeout
We were creating the name resolution context as a child of lp_ctx,
which meant when we gave up on a connection the timer on name
resolution kept running, and when it timed out the callback crashed as
the socket was already removed.
2009-09-19 08:23:03 -07: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
c8565c0e7a s4:libcli/resolve: remove all backend specific sync functions
metze
2008-12-17 19:12:27 +01:00
Stefan Metzmacher
f6b3c70b97 s4:libcli/resolve: let the "host" module use the dns_ex.c code
That means we now return all ip addresses instead of just the first one.

metze
2008-12-17 19:12:26 +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
Stefan Metzmacher
8df2140c18 s4:libcli/resolve: don't use __RESOLVE_H__ it might be used by system headers too
metze
2008-12-17 19:12:25 +01:00
Stefan Metzmacher
081f8883ba s4: fix LIBEVENTS dependencies and use more forward declarations
We should only include events.h where we really need it
and prefer forward declarations of 'struct event_context'

metze
2008-12-17 11:04:45 +01:00
Stefan Metzmacher
4a3ae3831d s4:libcli/resolve: add resolve_name_all*() which return all addresses not only the first one
metze
2008-12-11 17:58:31 +01:00
Stefan Metzmacher
8c2c62c5ea s4:libcli/resolve: don't ignore SIGCHLD anymore
This broke ldbedit against a LDAP server,
as the editor is called by "system()" which relies
on getting something useful out of waitpid().

TODO: we should create a generic infrastructure to
      handle temporary forks and integrate the signal
      handling with signal events there.

metze
2008-11-16 16:22:08 +01:00
Jelmer Vernooij
cb7d085ec3 Use global iconv convenience rather than global loadparm. 2008-11-02 00:35:04 +01:00
Jelmer Vernooij
23302413b3 Remove unused include param/param.h. 2008-10-24 16:37:56 +02:00
Jelmer Vernooij
87ec1d2532 Make sure prototypes are always included, make some functions static and
remove some unused functions.
2008-10-20 18:59:51 +02:00
Jelmer Vernooij
218f482fbf Use common strlist implementation in Samba 3 and Samba 4. 2008-10-12 00:56:56 +02:00
Jelmer Vernooij
9565999755 Fix include paths to new location of libutil. 2008-10-11 21:31:42 +02:00
Andrew Tridgell
be050125b6 - make bcast name resolution match other name resolution modules for
host not found errors

- when we have no resolve context return NT_STATUS_OBJECT_NAME_NOT_FOUND
2008-09-30 08:46:00 -07:00
Andrew Tridgell
8104968004 return a more useful error message when no name resolution methods are
available
2008-09-29 21:59:04 -07:00
Günther Deschner
a1a92688ba s4-nbt: use ../libcli/nbt
Guenther
2008-09-23 09:37:24 +02:00
Günther Deschner
13a3971438 s4-nbt: use private_data instead of private.
Guenther
2008-09-23 09:37:24 +02:00
Volker Lendecke
8113bb07a8 Fix an uninitialized variable introduced by 3045d391
Simo, please check!

Volker
(This used to be commit 0c09d28acf)
2008-05-14 19:51:29 +02:00
Simo Sorce
4e83011f72 Remove more event_context_init() uses from function calls within deep down the code.
Make sure we pass around the event_context where we need it instead.
All test but a few python ones fail. Jelmer promised to fix them.
(This used to be commit 3045d39162)
2008-04-21 18:12:33 -04:00
Jelmer Vernooij
10169a2030 Remove more global_loadparm instance.s
(This used to be commit a1280252ce)
2008-02-21 17:54:24 +01:00
Jelmer Vernooij
c38c2765d1 Remove yet more uses of global_loadparm.
(This used to be commit e01c1e87c0)
2008-02-21 17:17:37 +01:00
Jelmer Vernooij
e8f46760e0 r26437: remove another use of global_loadparm.
(This used to be commit 703f17bc09)
2007-12-21 05:50:05 +01:00
Jelmer Vernooij
aa32619c5c r26426: Remove uses of global_loadparm.
(This used to be commit e1d177c8c1)
2007-12-21 05:49:52 +01:00
Jelmer Vernooij
70f1f33af8 r26402: Require a talloc context in libnetif.
(This used to be commit a35e51871b)
2007-12-21 05:49:33 +01:00
Jelmer Vernooij
6f2252dace r26401: Don't cache interfaces context in libnetif.
(This used to be commit 9f975417cc)
2007-12-21 05:49:32 +01:00
Jelmer Vernooij
1ea47faa97 r26397: Fix circular dependency in samba-socket.
(This used to be commit 801c8c766c)
2007-12-21 05:49:26 +01:00
Stefan Metzmacher
6a56c111d7 r26391: samba4 doesn't support 'lmhosts' as resolve module
metze
(This used to be commit cdb64b4101)
2007-12-21 05:49:21 +01:00
Jelmer Vernooij
eede6b87e1 r26378: Remove use of global_loadparm.
(This used to be commit 81333de535)
2007-12-21 05:49:12 +01:00
Jelmer Vernooij
5f4842cf65 r26376: Add context for libcli_resolve.
(This used to be commit 459e1466a4)
2007-12-21 05:49:12 +01:00
Jelmer Vernooij
c5bf20c5fe r26325: Remove use of global_loadparm in netif.
(This used to be commit e452cb2859)
2007-12-21 05:48:37 +01:00
Jelmer Vernooij
b84be078c1 r26309: Move specification of port higher up the all stack.
(This used to be commit 7de55cde7c)
2007-12-21 05:48:21 +01:00
Jelmer Vernooij
1fbdd6ef1d r26264: pass name resolve order explicitly, use torture context for settings in dssync tests.
(This used to be commit c7eae1c784)
2007-12-21 05:47:39 +01:00
Jelmer Vernooij
0bccc88392 r25903: Move more files out of torture/
(This used to be commit f734df3144)
2007-12-21 05:44:46 +01:00
Jelmer Vernooij
b09047b78e r25624: Remove ipv4_addr hack. Only causes 4 extra includes of system/network.h because we stripped down includes.
(This used to be commit 262c1c23a6)
2007-12-21 05:43:00 +01:00