1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

s4-spnupdate: only enable NDR print at log level above 5

This commit is contained in:
Andrew Tridgell 2010-11-18 15:26:48 +11:00
parent 1ce223017d
commit 3f952aba2b

View File

@ -195,7 +195,10 @@ def call_rodc_update(d):
sys.exit(1) sys.exit(1)
server = cldap_ret.pdc_dns_name server = cldap_ret.pdc_dns_name
try: try:
drs = drsuapi.drsuapi('ncacn_ip_tcp:%s[seal,print]' % server, lp, creds) binding_options = "seal"
if lp.get("log level") >= 5:
binding_options += ",print"
drs = drsuapi.drsuapi('ncacn_ip_tcp:%s[%s]' % (server, binding_options), lp, creds)
(drs_handle, supported_extensions) = drs_utils.drs_DsBind(drs) (drs_handle, supported_extensions) = drs_utils.drs_DsBind(drs)
except Exception, reason: except Exception, reason:
print("Unable to connect to DC '%s' for domain '%s' : %s" % (server, domain, reason)) print("Unable to connect to DC '%s' for domain '%s' : %s" % (server, domain, reason))