diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-09-18 20:22:44 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-09-19 11:29:32 -0700 |
commit | 50f56c6a82e7bd3742730a50b7d7c614482b9fec (patch) | |
tree | 2ba0a3ca511164f55551ea7f8834071494d04612 /source4/libcli | |
parent | e72a1e20557f212af03d32152f0cc11acee57814 (diff) | |
download | samba-50f56c6a82e7bd3742730a50b7d7c614482b9fec.tar.gz samba-50f56c6a82e7bd3742730a50b7d7c614482b9fec.tar.bz2 samba-50f56c6a82e7bd3742730a50b7d7c614482b9fec.zip |
s4-finddcs: added some debug messages on failure
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/finddcs_cldap.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source4/libcli/finddcs_cldap.c b/source4/libcli/finddcs_cldap.c index 33e31a9cf7..b8cc5cb146 100644 --- a/source4/libcli/finddcs_cldap.c +++ b/source4/libcli/finddcs_cldap.c @@ -36,6 +36,7 @@ struct finddcs_cldap_state { struct tevent_req *req; const char *domain_name; struct dom_sid *domain_sid; + const char *srv_name; const char **srv_addresses; uint32_t minimum_dc_flags; uint32_t srv_address_index; @@ -112,18 +113,17 @@ static bool finddcs_cldap_srv_lookup(struct finddcs_cldap_state *state, struct resolve_context *resolve_ctx, struct tevent_context *event_ctx) { - const char *srv_name; struct composite_context *creq; struct nbt_name name; if (io->in.site_name) { - srv_name = talloc_asprintf(state, "_ldap._tcp.%s._sites.%s", + state->srv_name = talloc_asprintf(state, "_ldap._tcp.%s._sites.%s", io->in.site_name, io->in.domain_name); } else { - srv_name = talloc_asprintf(state, "_ldap._tcp.%s", io->in.domain_name); + state->srv_name = talloc_asprintf(state, "_ldap._tcp.%s", io->in.domain_name); } - make_nbt_name(&name, srv_name, 0); + make_nbt_name(&name, state->srv_name, 0); creq = resolve_name_ex_send(resolve_ctx, state, RESOLVE_NAME_FLAG_FORCE_DNS | RESOLVE_NAME_FLAG_DNS_SRV, @@ -167,6 +167,7 @@ static void finddcs_cldap_next_server(struct finddcs_cldap_state *state) if (state->srv_addresses[state->srv_address_index] == NULL) { tevent_req_nterror(state->req, NT_STATUS_OBJECT_NAME_NOT_FOUND); + DEBUG(2,("No matching CLDAP server found\n")); return; } @@ -247,6 +248,7 @@ static void finddcs_cldap_name_resolved(struct composite_context *ctx) status = resolve_name_recv(ctx, state, &address); if (tevent_req_nterror(state->req, status)) { + DEBUG(2,("No matching NBT <1c> server found\n")); return; } @@ -279,6 +281,7 @@ static void finddcs_cldap_srv_resolved(struct composite_context *ctx) status = resolve_name_multiple_recv(ctx, state, &state->srv_addresses); if (tevent_req_nterror(state->req, status)) { + DEBUG(2,("Failed to find SRV record for %s\n", state->srv_name)); return; } |