From 0c9ca3fe19249c19ac3525f3e6e19242b3e77f7f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 2 Sep 2006 01:23:08 +0000 Subject: r17994: Add debugs that showed me why my site code wasn't working right. Don't update the server site when we have a client one... Jeremy. (This used to be commit 7acbcf9a6c71f8e7f9167880488613c930cef4d9) --- source3/libads/kerberos.c | 3 +++ source3/libads/ldap.c | 9 +++++++-- source3/nsswitch/winbindd_cm.c | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c index 0707427a22..fb15ace7c7 100644 --- a/source3/libads/kerberos.c +++ b/source3/libads/kerberos.c @@ -484,6 +484,9 @@ BOOL create_local_private_krb5_conf_for_domain(const char *realm, const char *do return False; } + DEBUG(10,("create_local_private_krb5_conf_for_domain: fname = %s, realm = %s, domain = %s\n", + fname, realm, domain )); + realm_upper = talloc_strdup(fname, realm); strupper_m(realm_upper); diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 4fbb0c7af3..b23bc277e8 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -124,14 +124,19 @@ BOOL ads_sitename_match(ADS_STRUCT *ads) { if (ads->config.server_site_name == NULL && ads->config.client_site_name == NULL ) { + DEBUG(10,("ads_sitename_match: both null\n")); return True; } if (ads->config.server_site_name && ads->config.client_site_name && strequal(ads->config.server_site_name, ads->config.client_site_name)) { + DEBUG(10,("ads_sitename_match: name %s match\n", ads->config.server_site_name)); return True; } + DEBUG(10,("ads_sitename_match: no match %s %s\n", + ads->config.server_site_name ? ads->config.server_site_name : "NULL", + ads->config.client_site_name ? ads->config.client_site_name : "NULL")); return False; } #endif @@ -192,8 +197,8 @@ BOOL ads_try_connect(ADS_STRUCT *ads, const char *server ) SMB_STRDUP(cldap_reply.server_site_name); } if (*cldap_reply.client_site_name) { - ads->config.server_site_name = - SMB_STRDUP(cldap_reply.server_site_name); + ads->config.client_site_name = + SMB_STRDUP(cldap_reply.client_site_name); } ads->server.workgroup = SMB_STRDUP(cldap_reply.netbios_domain); diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index b3332970db..6c35539e4d 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -606,6 +606,7 @@ static BOOL dcip_to_name( const char *domainname, const char *realm, fstrcpy(name, ads->config.ldap_server_name); namecache_store(name, 0x20, 1, &ip_list); + DEBUG(10,("dcip_to_name: flags = 0x%x\n", (unsigned int)ads->config.flags)); #ifdef HAVE_KRB5 if ((ads->config.flags & ADS_KDC) && ads_sitename_match(ads)) { /* We're going to use this KDC for this realm/domain. -- cgit