diff options
author | Lars Müller <lmuelle@samba.org> | 2007-09-08 14:56:11 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:30:36 -0500 |
commit | a747e8bdcfdd45f34324ec72310320927e97e9ad (patch) | |
tree | 6c3bff20830796a0f7497721d330ffe0b57f4c6d /source3/libsmb | |
parent | 9fa56b9ae9df53b60ff76f4ce08d720ff9a6fc36 (diff) | |
download | samba-a747e8bdcfdd45f34324ec72310320927e97e9ad.tar.gz samba-a747e8bdcfdd45f34324ec72310320927e97e9ad.tar.bz2 samba-a747e8bdcfdd45f34324ec72310320927e97e9ad.zip |
r25032: Contact an off site DC if non is available on site.
(This used to be commit 50879e6de5101b6c5ab8b3fb954f1d2a48530716)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/namequery_dc.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/source3/libsmb/namequery_dc.c b/source3/libsmb/namequery_dc.c index 7dac69e2db..bdac833d13 100644 --- a/source3/libsmb/namequery_dc.c +++ b/source3/libsmb/namequery_dc.c @@ -98,15 +98,22 @@ static BOOL ads_dc_name(const char *domain, } #ifdef HAVE_KRB5 - if (is_our_primary_domain(domain) && (ads->config.flags & ADS_KDC) && ads_closest_dc(ads)) { - /* We're going to use this KDC for this realm/domain. - If we are using sites, then force the krb5 libs - to use this KDC. */ - - create_local_private_krb5_conf_for_domain(realm, - domain, - sitename, - ads->ldap.ip); + if (is_our_primary_domain(domain) && (ads->config.flags & ADS_KDC)) { + if (ads_closest_dc(ads)) { + /* We're going to use this KDC for this realm/domain. + If we are using sites, then force the krb5 libs + to use this KDC. */ + + create_local_private_krb5_conf_for_domain(realm, + domain, + sitename, + ads->ldap.ip); + } else { + create_local_private_krb5_conf_for_domain(realm, + domain, + NULL, + ads->ldap.ip); + } } #endif break; |