diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-09-14 20:10:51 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-09-15 15:39:36 +1000 |
commit | 59d415f43f72146b15a721e928cf346777239bfc (patch) | |
tree | e6bd1c56d75e328256bdb0f2e67795fee52c1c08 /source4/libnet | |
parent | 99f514f233fb1b3dcdd19cd2cc9ca9130ea841c8 (diff) | |
download | samba-59d415f43f72146b15a721e928cf346777239bfc.tar.gz samba-59d415f43f72146b15a721e928cf346777239bfc.tar.bz2 samba-59d415f43f72146b15a721e928cf346777239bfc.zip |
s4-finddc: use NBT lookup for a 1C name if joining a short domain name
once we get the 1C lookup reply, use a CLDAP query to find the details
for the server
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/libnet')
-rw-r--r-- | source4/libnet/libnet_lookup.c | 5 | ||||
-rw-r--r-- | source4/libnet/py_net.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/source4/libnet/libnet_lookup.c b/source4/libnet/libnet_lookup.c index c6af75b4e3..3677c2a31e 100644 --- a/source4/libnet/libnet_lookup.c +++ b/source4/libnet/libnet_lookup.c @@ -195,7 +195,10 @@ struct tevent_req *libnet_LookupDCs_send(struct libnet_context *ctx, struct finddcs finddcs_io; ZERO_STRUCT(finddcs_io); - finddcs_io.in.dns_domain_name = lpcfg_realm(ctx->lp_ctx); + finddcs_io.in.domain_name = lpcfg_realm(ctx->lp_ctx); + if (strcmp(finddcs_io.in.domain_name, "") == 0) { + finddcs_io.in.domain_name = lpcfg_workgroup(ctx->lp_ctx); + } finddcs_io.in.minimum_dc_flags = NBT_SERVER_LDAP | NBT_SERVER_DS | NBT_SERVER_WRITABLE; diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c index b019d7c2fc..8ff383036e 100644 --- a/source4/libnet/py_net.c +++ b/source4/libnet/py_net.c @@ -479,7 +479,7 @@ static PyObject *py_net_finddc(py_net_Object *self, PyObject *args) mem_ctx = talloc_new(self->mem_ctx); ZERO_STRUCT(io); - io.in.dns_domain_name = domain_name; + io.in.domain_name = domain_name; io.in.minimum_dc_flags = server_type; status = finddcs_cldap(mem_ctx, &io, |