r19249: Attempt to fix a site lookup bug found by Guenther.
authorJeremy Allison <jra@samba.org>
Wed, 11 Oct 2006 18:54:40 +0000 (18:54 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:15:25 +0000 (12:15 -0500)
commitb2d1e44f59d32c91b1d48eacd1a158ba7b65762d
treed2b43aca651ef4c105e3463229dc64b9e96e005d
parented6070b7a053e162a9ac5809ff54181c04267f00
r19249: Attempt to fix a site lookup bug found by Guenther.

- "The problem is, with a fresh system, we don't know our sitename,
therefor we do a stupid DNS query for all DCs. The reply we get is a
round-robin list of all 21 DCs, we just pick the first, contact that
and safe that INET.COM#1C query in the name cache for later use...
What we need to do if we don't yet know our sitename, is to contact to
any DC, get the CLDAP reply to tell us in which site we are, then flush
the namecache and requery DNS including the sitename"

Implement the flushing of the #1C entries for a given NetBIOS name/realm
when looking up the site value.

Jeremy.
source/libsmb/namecache.c
source/libsmb/namequery_dc.c