diff options
author | Andrew Tridgell <tridge@samba.org> | 2002-07-30 15:34:10 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2002-07-30 15:34:10 +0000 |
commit | 55c978d85ea9b2fbd3eeb597d4b383399c5106a7 (patch) | |
tree | 978052f38d5a9b665c3950ddbd6a301325514051 /source3/auth/auth_domain.c | |
parent | 9edc1cd4cfd3c02cfb1b867f8450384c446e8b60 (diff) | |
download | samba-55c978d85ea9b2fbd3eeb597d4b383399c5106a7.tar.gz samba-55c978d85ea9b2fbd3eeb597d4b383399c5106a7.tar.bz2 samba-55c978d85ea9b2fbd3eeb597d4b383399c5106a7.zip |
net ads info now reports the IP of the LDAP server as well as its name - very useful in scripts
(This used to be commit fc0d5479b575c1f495b9251413eed18ec1e37e02)
Diffstat (limited to 'source3/auth/auth_domain.c')
-rw-r--r-- | source3/auth/auth_domain.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c index f74f1bb9e8..327d49144f 100644 --- a/source3/auth/auth_domain.c +++ b/source3/auth/auth_domain.c @@ -46,6 +46,8 @@ static NTSTATUS ads_resolve_dc(fstring remote_machine, return NT_STATUS_NO_LOGON_SERVERS; } + DEBUG(4,("ads_resolve_dc: realm=%s\n", ads->realm)); + #ifdef HAVE_ADS /* a full ads_connect() is actually overkill, as we don't srictly need to do the SASL auth in order to get the info we need, but libads @@ -57,10 +59,10 @@ static NTSTATUS ads_resolve_dc(fstring remote_machine, fstrcpy(remote_machine, ads->ldap_server_name); strupper(remote_machine); - *dest_ip = *interpret_addr2(ads->ldap_server); + *dest_ip = ads->ldap_ip; ads_destroy(&ads); - if (!*remote_machine) { + if (!*remote_machine || is_zero_ip(*dest_ip)) { return NT_STATUS_NO_LOGON_SERVERS; } @@ -166,8 +168,8 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli, return NT_STATUS_NO_LOGON_SERVERS; /* Attempt connection */ - result = cli_full_connection(cli, global_myname, server, - &dest_ip, 0, "IPC$", "IPC", "", "", "", 0); + result = cli_full_connection(cli, global_myname, remote_machine, + &dest_ip, 0, "IPC$", "IPC", "", "", ""); if (!NT_STATUS_IS_OK(result)) { release_server_mutex(); |