summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2015-04-24 16:53:35 +1200
committerAndrew Bartlett <abartlet@samba.org>2015-05-30 21:05:24 +0200
commitf66a2f031784ec17ee1e124a6bb53c5a519b5c57 (patch)
treef414b118147d64505bbcc2ef23cb6224161cdd03 /source4/scripting
parent7f7339cced2d20b67195db03add0f91cc9f01152 (diff)
downloadsamba-f66a2f031784ec17ee1e124a6bb53c5a519b5c57.tar.gz
KCC: improve docstring and comments for KCC.load_site()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/scripting')
-rwxr-xr-xsource4/scripting/bin/samba_kcc13
1 files changed, 9 insertions, 4 deletions
diff --git a/source4/scripting/bin/samba_kcc b/source4/scripting/bin/samba_kcc
index 753d502226e..97d1618074c 100755
--- a/source4/scripting/bin/samba_kcc
+++ b/source4/scripting/bin/samba_kcc
@@ -167,14 +167,19 @@ class KCC(object):
self.sitelink_table[dnstr] = sitelink
def load_site(self, dn_str):
- """Helper for load_my_site and load_all_sites. It puts all the site's
- DSAs into the KCC indices.
+ """Helper for load_my_site and load_all_sites.
+
+ Put all the site's DSAs into the KCC indices.
+
+ :param dn_str: a site dn_str
+ :return: the Site object pertaining to the dn_str
"""
site = Site(dn_str, unix_now)
site.load_site(self.samdb)
- # I am not sure why, but we avoid replacing the site with an
- # identical copy.
+ # We avoid replacing the site with an identical copy in case
+ # somewhere else has a reference to the old one, which would
+ # lead to all manner of confusion and chaos.
guid = str(site.site_guid)
if guid not in self.site_table:
self.site_table[guid] = site