[SCM] Samba Shared Repository - branch master updated
Günther Deschner
gd at samba.org
Thu Jan 6 09:30:02 MST 2011
The branch, master has been updated
via fa1fd85 s3-net: Fix bug #7690: retry DNS updates when connection to one nameserver has failed.
via 7ee75c9 lib/addns: move DNS client library to the main directory.
from 4e0d0af acl tests: Fix import.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit fa1fd85eea549d2944974ddbc67e21ef9231c49b
Author: Günther Deschner <gd at samba.org>
Date: Thu Jan 6 16:23:54 2011 +0100
s3-net: Fix bug #7690: retry DNS updates when connection to one nameserver has failed.
Initial patch from Patrik Martinsson <patrik.martinsson at smhi.se>.
Guenther
Autobuild-User: Günther Deschner <gd at samba.org>
Autobuild-Date: Thu Jan 6 17:29:11 CET 2011 on sn-devel-104
commit 7ee75c95481f0d13598577361d18e96cb8394b9c
Author: Günther Deschner <gd at samba.org>
Date: Thu Jan 6 14:53:04 2011 +0100
lib/addns: move DNS client library to the main directory.
Guenther
-----------------------------------------------------------------------
Summary of changes:
{source3/libaddns => lib/addns}/addns.h | 0
{source3/libaddns => lib/addns}/dns.h | 0
{source3/libaddns => lib/addns}/dnserr.h | 0
{source3/libaddns => lib/addns}/dnsgss.c | 0
{source3/libaddns => lib/addns}/dnsmarshall.c | 0
{source3/libaddns => lib/addns}/dnsrecord.c | 0
{source3/libaddns => lib/addns}/dnssock.c | 0
{source3/libaddns => lib/addns}/dnsutils.c | 0
{source3/libaddns => lib/addns}/error.c | 0
{source3/libaddns => lib/addns}/wscript_build | 0
source3/Makefile.in | 6 ++--
source3/configure.in | 2 +-
source3/utils/net_ads.c | 27 +++++++++++++++++++-----
source3/wscript_build | 2 +-
14 files changed, 26 insertions(+), 11 deletions(-)
rename {source3/libaddns => lib/addns}/addns.h (100%)
rename {source3/libaddns => lib/addns}/dns.h (100%)
rename {source3/libaddns => lib/addns}/dnserr.h (100%)
rename {source3/libaddns => lib/addns}/dnsgss.c (100%)
rename {source3/libaddns => lib/addns}/dnsmarshall.c (100%)
rename {source3/libaddns => lib/addns}/dnsrecord.c (100%)
rename {source3/libaddns => lib/addns}/dnssock.c (100%)
rename {source3/libaddns => lib/addns}/dnsutils.c (100%)
rename {source3/libaddns => lib/addns}/error.c (100%)
rename {source3/libaddns => lib/addns}/wscript_build (100%)
Changeset truncated at 500 lines:
diff --git a/source3/libaddns/addns.h b/lib/addns/addns.h
similarity index 100%
rename from source3/libaddns/addns.h
rename to lib/addns/addns.h
diff --git a/source3/libaddns/dns.h b/lib/addns/dns.h
similarity index 100%
rename from source3/libaddns/dns.h
rename to lib/addns/dns.h
diff --git a/source3/libaddns/dnserr.h b/lib/addns/dnserr.h
similarity index 100%
rename from source3/libaddns/dnserr.h
rename to lib/addns/dnserr.h
diff --git a/source3/libaddns/dnsgss.c b/lib/addns/dnsgss.c
similarity index 100%
rename from source3/libaddns/dnsgss.c
rename to lib/addns/dnsgss.c
diff --git a/source3/libaddns/dnsmarshall.c b/lib/addns/dnsmarshall.c
similarity index 100%
rename from source3/libaddns/dnsmarshall.c
rename to lib/addns/dnsmarshall.c
diff --git a/source3/libaddns/dnsrecord.c b/lib/addns/dnsrecord.c
similarity index 100%
rename from source3/libaddns/dnsrecord.c
rename to lib/addns/dnsrecord.c
diff --git a/source3/libaddns/dnssock.c b/lib/addns/dnssock.c
similarity index 100%
rename from source3/libaddns/dnssock.c
rename to lib/addns/dnssock.c
diff --git a/source3/libaddns/dnsutils.c b/lib/addns/dnsutils.c
similarity index 100%
rename from source3/libaddns/dnsutils.c
rename to lib/addns/dnsutils.c
diff --git a/source3/libaddns/error.c b/lib/addns/error.c
similarity index 100%
rename from source3/libaddns/error.c
rename to lib/addns/error.c
diff --git a/source3/libaddns/wscript_build b/lib/addns/wscript_build
similarity index 100%
rename from source3/libaddns/wscript_build
rename to lib/addns/wscript_build
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 50046cc..7151df9 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -491,8 +491,8 @@ PARAM_OBJ = $(PARAM_WITHOUT_REG_OBJ) $(PARAM_REG_ADD_OBJ)
KRBCLIENT_OBJ = libads/kerberos.o libads/ads_status.o
-LIBADDNS_OBJ0 = libaddns/dnsrecord.o libaddns/dnsutils.o libaddns/dnssock.o \
- libaddns/dnsgss.o libaddns/dnsmarshall.o libaddns/error.o
+LIBADDNS_OBJ0 = ../lib/addns/dnsrecord.o ../lib/addns/dnsutils.o ../lib/addns/dnssock.o \
+ ../lib/addns/dnsgss.o ../lib/addns/dnsmarshall.o ../lib/addns/error.o
LIBADDNS_OBJ = $(LIBADDNS_OBJ0) $(SOCKET_WRAPPER_OBJ)
GPEXT_OBJ = ../libgpo/gpext/gpext.o @GPEXT_STATIC@
@@ -2245,7 +2245,7 @@ LIBADDNS_SHARED_TARGET_SONAME=$(LIBADDNS_SHARED_TARGET).$(LIBADDNS_SOVER)
LIBADDNS_STATIC_TARGET=@LIBADDNS_STATIC_TARGET@
LIBADDNS=@LIBADDNS_STATIC@ @LIBADDNS_SHARED@
#LIBADDNS_SYMS=$(srcdir)/exports/libaddns. at SYMSEXT@
-LIBADDNS_HEADERS=$(srcdir)/libaddns/addns.h
+LIBADDNS_HEADERS=$(srcdir)/../lib/addns/addns.h
$(LIBADDNS_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBADDNS_OBJ) $(LIBTALLOC)
@echo Linking shared library $@
diff --git a/source3/configure.in b/source3/configure.in
index ac43308..f565fdb 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -37,7 +37,7 @@ LIBS="${LIBS} ${TEVENT_LIBS}"
SAMBA_CPPFLAGS="-Iinclude -I${srcdir-.}/include -I. -I${srcdir-.}"
SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/replace"
SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TEVENT_CFLAGS}"
-SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/libaddns"
+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/addns"
SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/librpc"
SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/.."
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 48df564..ac14184 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -1132,7 +1132,7 @@ static NTSTATUS net_update_dns_internal(TALLOC_CTX *ctx, ADS_STRUCT *ads,
int num_addrs)
{
struct dns_rr_ns *nameservers = NULL;
- int ns_count = 0;
+ int ns_count = 0, i;
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
DNS_ERROR dns_err;
fstring dns_server;
@@ -1197,16 +1197,31 @@ static NTSTATUS net_update_dns_internal(TALLOC_CTX *ctx, ADS_STRUCT *ads,
}
- /* Now perform the dns update - we'll try non-secure and if we fail,
- we'll follow it up with a secure update */
+ for (i=0; i < ns_count; i++) {
- fstrcpy( dns_server, nameservers[0].hostname );
+ /* Now perform the dns update - we'll try non-secure and if we fail,
+ we'll follow it up with a secure update */
+
+ fstrcpy( dns_server, nameservers[i].hostname );
+
+ dns_err = DoDNSUpdate(dns_server, dnsdomain, machine_name, addrs, num_addrs);
+ if (ERR_DNS_IS_OK(dns_err)) {
+ status = NT_STATUS_OK;
+ goto done;
+ }
+
+ if (ERR_DNS_EQUAL(dns_err, ERROR_DNS_INVALID_NAME_SERVER) ||
+ ERR_DNS_EQUAL(dns_err, ERROR_DNS_CONNECTION_FAILED) ||
+ ERR_DNS_EQUAL(dns_err, ERROR_DNS_SOCKET_ERROR)) {
+ DEBUG(1,("retrying DNS update with next nameserver after receiving %s\n",
+ dns_errstr(dns_err)));
+ continue;
+ }
- dns_err = DoDNSUpdate(dns_server, dnsdomain, machine_name, addrs, num_addrs);
- if (!ERR_DNS_IS_OK(dns_err)) {
d_printf(_("DNS Update for %s failed: %s\n"),
machine_name, dns_errstr(dns_err));
status = NT_STATUS_UNSUCCESSFUL;
+ goto done;
}
done:
diff --git a/source3/wscript_build b/source3/wscript_build
index db4b48e..a9e2e24 100644
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -1489,6 +1489,7 @@ bld.RECURSE('../lib/tsocket')
bld.RECURSE('../lib/iniparser/src')
bld.RECURSE('../lib/crypto')
bld.RECURSE('../lib/async_req')
+bld.RECURSE('../lib/addns')
bld.RECURSE('../libcli/auth')
bld.RECURSE('../libcli/drsuapi')
bld.RECURSE('../libcli/samsync')
@@ -1503,7 +1504,6 @@ bld.RECURSE('winbindd')
bld.RECURSE('libgpo/gpext')
bld.RECURSE('pam_smbpass')
bld.RECURSE('rpc_server')
-bld.RECURSE('libaddns')
bld.ENFORCE_GROUP_ORDERING()
bld.CHECK_PROJECT_RULES()
--
Samba Shared Repository
More information about the samba-cvs
mailing list