print("Failed 'samba-tool dns' based update: %s : %s" % (str(d), estr))
raise
+irpc_wb = None
+def cached_irpc_wb(lp):
+ global irpc_wb
+ if irpc_wb is not None:
+ return irpc_wb
+ irpc_wb = winbind.winbind("irpc:winbind_server", lp)
+ return irpc_wb
+
def rodc_dns_update(d, t, op):
'''a single DNS update via the RODC netlogon call'''
global sub_vars
netlogon.NlDnsGenericGcAtSite : netlogon.NlDnsDomainNameAlias
}
- w = winbind.winbind("irpc:winbind_server", lp)
+ w = cached_irpc_wb(lp)
dns_names = netlogon.NL_DNS_NAME_INFO_ARRAY()
dns_names.count = 1
name = netlogon.NL_DNS_NAME_INFO()
print("Error setting DNS entry of type %u: %s: %s" % (t, d, reason))
error_count = error_count + 1
+ if opts.verbose:
+ print("Called netlogon RODC update for %s" % d)
+
if error_count != 0 and opts.fail_immediately:
sys.exit(1)