summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-06-25 19:00:15 +0000
committerGerald Carter <jerry@samba.org>2003-06-25 19:00:15 +0000
commit2a76101a3a31f5fca2f444b25e3f0486f7ef406f (patch)
tree6aae4e02602c1c2710d13b7153b03c0caf94a121 /source
parentef978bd851431da373e005177504dbef2611cf4f (diff)
downloadsamba-2a76101a3a31f5fca2f444b25e3f0486f7ef406f.tar.gz
samba-2a76101a3a31f5fca2f444b25e3f0486f7ef406f.tar.xz
samba-2a76101a3a31f5fca2f444b25e3f0486f7ef406f.zip
* fix typos in a few debug statements
* check negative connection cache before ads_try_connect() in ads_find_dc()
Diffstat (limited to 'source')
-rw-r--r--source/libads/ldap.c12
-rw-r--r--source/libsmb/conncache.c2
-rw-r--r--source/nsswitch/winbindd_cm.c2
3 files changed, 11 insertions, 5 deletions
diff --git a/source/libads/ldap.c b/source/libads/ldap.c
index a168f75e989..60bbef821ca 100644
--- a/source/libads/ldap.c
+++ b/source/libads/ldap.c
@@ -130,7 +130,7 @@ again:
pstrcpy( realm, c_realm );
- DEBUG(6,("ads_try_dns: looking for %s realm '%s'\n",
+ DEBUG(6,("ads_find_dc: looking for %s '%s'\n",
(got_realm ? "realm" : "domain"), realm));
if ( !get_sorted_dc_list(realm, &ip_list, &count, got_realm) ) {
@@ -147,14 +147,20 @@ again:
for ( i=0; i<count; i++ ) {
/* since this is an ads conection request, default to LDAP_PORT is not set */
int port = (ip_list[i].port!=PORT_NONE) ? ip_list[i].port : LDAP_PORT;
+ fstring server;
- if ( ads_try_connect(ads, inet_ntoa(ip_list[i].ip), port) ) {
+ fstrcpy( server, inet_ntoa(ip_list[i].ip) );
+
+ if ( !NT_STATUS_IS_OK(check_negative_conn_cache(realm, server)) )
+ continue;
+
+ if ( ads_try_connect(ads, server, port) ) {
SAFE_FREE(ip_list);
return True;
}
/* keep track of failures */
- add_failed_connection_entry( realm, inet_ntoa(ip_list[i].ip), NT_STATUS_UNSUCCESSFUL );
+ add_failed_connection_entry( realm, server, NT_STATUS_UNSUCCESSFUL );
}
SAFE_FREE(ip_list);
diff --git a/source/libsmb/conncache.c b/source/libsmb/conncache.c
index ab0501b0be7..da31e25a9ca 100644
--- a/source/libsmb/conncache.c
+++ b/source/libsmb/conncache.c
@@ -107,7 +107,7 @@ void add_failed_connection_entry(const char *domain, const char *server, NTSTATU
for (fcc = failed_connection_cache; fcc; fcc = fcc->next) {
if ( strequal(fcc->domain_name, domain) && strequal(fcc->controller, server) )
{
- DEBUG(10, ("add_failed_connection_entry_byname: domain %s (%s) already tried and failed\n",
+ DEBUG(10, ("add_failed_connection_entry: domain %s (%s) already tried and failed\n",
domain, server ));
return;
}
diff --git a/source/nsswitch/winbindd_cm.c b/source/nsswitch/winbindd_cm.c
index befd1d562c0..9f5bf3f11a8 100644
--- a/source/nsswitch/winbindd_cm.c
+++ b/source/nsswitch/winbindd_cm.c
@@ -94,7 +94,7 @@ static BOOL ads_dc_name(const char *domain, struct in_addr *dc_ip, fstring srv_n
/* we don't need to bind, just connect */
ads->auth.flags |= ADS_AUTH_NO_BIND;
- DEBUG(4,("cm_ads_find_dc: domain=%s\n", domain));
+ DEBUG(4,("ads_dc_name: domain=%s\n", domain));
#ifdef HAVE_ADS
/* a full ads_connect() is actually overkill, as we don't srictly need