mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
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@samba.org> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Sat Nov 27 03:47:52 CET 2010 on sn-devel-104
This commit is contained in:
parent
8737baee7c
commit
dbb9500448
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user