[SCM] Samba Shared Repository - branch master updated

Andrew Tridgell tridge at samba.org
Fri Nov 26 19:48:01 MST 2010


The branch, master has been updated
       via  dbb9500 s4-libnet: use the full DNS domain for CLDAP lookups if possible
      from  8737bae wintest: cope with VMs sometimes not rebooting

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit dbb9500448ada04094db854aa81118d95cdc687a
Author: Andrew Tridgell <tridge at samba.org>
Date:   Sat Nov 27 12:59:51 2010 +1100

    s4-libnet: use the full DNS domain for CLDAP lookups if possible
    
    many of the internal libnet interfaces use the short domain name,
    which leads to unreliable NBT lookups. If we are trying to look for
    our workgroup, then look for our DNS domain instead
    
    Pair-Programmed-With: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User: Andrew Tridgell <tridge at samba.org>
    Autobuild-Date: Sat Nov 27 03:47:52 CET 2010 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 source4/libnet/libnet_lookup.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/libnet/libnet_lookup.c b/source4/libnet/libnet_lookup.c
index 6675070..272a3fa 100644
--- a/source4/libnet/libnet_lookup.c
+++ b/source4/libnet/libnet_lookup.c
@@ -195,7 +195,12 @@ struct tevent_req *libnet_LookupDCs_send(struct libnet_context *ctx,
 	struct finddcs finddcs_io;
 
 	ZERO_STRUCT(finddcs_io);
-	finddcs_io.in.domain_name = io->in.domain_name;
+
+	if (strcasecmp_m(io->in.domain_name, lpcfg_workgroup(ctx->lp_ctx)) == 0) {
+		finddcs_io.in.domain_name = lpcfg_dnsdomain(ctx->lp_ctx);
+	} else {
+		finddcs_io.in.domain_name = io->in.domain_name;
+	}
 	finddcs_io.in.minimum_dc_flags = NBT_SERVER_LDAP | NBT_SERVER_DS | NBT_SERVER_WRITABLE;
 	finddcs_io.in.server_address = ctx->server_address;
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list