1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

115 Commits

Author SHA1 Message Date
Andrew Bartlett
22cb631b4f s4-interfaces Rename interfaces code so not to conflict with source3/
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-08 12:57:04 +02:00
Andrew Bartlett
7261a9b9f7 s4-libcli Remove resolve_name() as it conflicts with Samba3.
This was just a wrapper around resolve_name_ex(), so just call that
instead.

Andrew Bartlett
2011-05-03 07:37:07 +02:00
Jelmer Vernooij
35fbc7bbda s4-smbtorture: Make test names lowercase and dot-separated.
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-12-11 04:16:13 +01: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
Matthias Dieter Wallnöfer
ae60328b1c s4:libcli/resolve/file.c - fix "const" warning
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-09-24 09:25:41 +10:00
Andrew Tridgell
66460c946a s4-resolve: the file backend should not look at the name type
this matches the behaviour of our DNS resolver

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-15 15:39:36 +10:00
Andrew Tridgell
dbc9b185af s4-resolve: added resolve_name_multiple_recv()
this allows for multiple replies to a SRV lookup

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-15 15:39:35 +10: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
f6a631bdec s4-resolve: added resolve_name_ex_send()
this allows access to the flags that control name resolution

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-02 13:37:08 +10:00
Andrew Tridgell
efbc702b1e s4-resolve: add a default domain for unqualified names in file backend
this better emulates what happens with real DNS
2010-09-02 13:37:08 +10:00
Andrew Tridgell
6b266b85cf s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
this converts all callers that use the Samba4 loadparm lp_ calling
convention to use the lpcfg_ prefix.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-16 18:24:27 +10:00
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 50feca550eed7828198b7c0fc5f0e5ddc863313d.
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 0c09d28acf42400d26cc27675e37226060de26d3)
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 3045d391626fba169aa26be52174883e18d323e9)
2008-04-21 18:12:33 -04:00
Jelmer Vernooij
10169a2030 Remove more global_loadparm instance.s
(This used to be commit a1280252ce924df69d911e597b7f65d8038abef9)
2008-02-21 17:54:24 +01:00
Jelmer Vernooij
c38c2765d1 Remove yet more uses of global_loadparm.
(This used to be commit e01c1e87c0fe9709df7eb5b863f7ce85564174cd)
2008-02-21 17:17:37 +01:00
Jelmer Vernooij
e8f46760e0 r26437: remove another use of global_loadparm.
(This used to be commit 703f17bc0986775bf3fe489eb5c876937dabaa9d)
2007-12-21 05:50:05 +01:00