diff options
author | Jeremy Allison <jra@samba.org> | 2006-08-31 00:07:24 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:39:01 -0500 |
commit | 256172f7d6dd384ea95457dd6322e0289057ac56 (patch) | |
tree | 37035ca4c21539c877548b0b944c177636d27d01 /source3/libads | |
parent | 4dcda274ef461d72eb81c2242c938fea108ffa7f (diff) | |
download | samba-256172f7d6dd384ea95457dd6322e0289057ac56.tar.gz samba-256172f7d6dd384ea95457dd6322e0289057ac56.tar.bz2 samba-256172f7d6dd384ea95457dd6322e0289057ac56.zip |
r17942: Jerry is right - when no site support is enabled
the client sitename is "Default-First-Site-Name".
Treat this as a blank site (no site configured).
Jeremy.
(This used to be commit 5c46381bd7dd1b3f11f427d111ded0b76fc1bec8)
Diffstat (limited to 'source3/libads')
-rw-r--r-- | source3/libads/dns.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/source3/libads/dns.c b/source3/libads/dns.c index 430486741d..4d935c1b6e 100644 --- a/source3/libads/dns.c +++ b/source3/libads/dns.c @@ -574,22 +574,27 @@ NTSTATUS ads_dns_lookup_ns( TALLOC_CTX *ctx, const char *dnsdomain, struct dns_r /**************************************************************************** Store the AD client sitename. We store indefinately as every new CLDAP query will re-write this. + If the sitename is "Default-First-Site-Name" we don't store it + as this isn't a valid DNS name. ****************************************************************************/ BOOL sitename_store(const char *sitename) { time_t expire; BOOL ret = False; - - if ( !sitename || (sitename && !*sitename)) { - DEBUG(2,("sitename_store: deleting empty sitename!\n")); - return gencache_del(SITENAME_KEY); - } - + if (!gencache_init()) { return False; } + if (!sitename || (sitename && !*sitename)) { + DEBUG(5,("sitename_store: deleting empty sitename!\n")); + return gencache_del(SITENAME_KEY); + } else if (sitename && strequal(sitename, "Default-First-Site-Name")) { + DEBUG(5,("sitename_store: delete default sitename Default-First-Site-Name\n")); + return gencache_del(SITENAME_KEY); + } + expire = get_time_t_max(); /* Store indefinately. */ DEBUG(10,("sitename_store: sitename = [%s], expire = [%u]\n", |