From 3f952aba2b98ef6dd00861c079b388c8f1652beb Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 18 Nov 2010 15:26:48 +1100 Subject: s4-spnupdate: only enable NDR print at log level above 5 --- source4/scripting/bin/samba_spnupdate | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source4/scripting/bin/samba_spnupdate b/source4/scripting/bin/samba_spnupdate index 7a4de7a77c..0dcc9fecfe 100755 --- a/source4/scripting/bin/samba_spnupdate +++ b/source4/scripting/bin/samba_spnupdate @@ -195,7 +195,10 @@ def call_rodc_update(d): sys.exit(1) server = cldap_ret.pdc_dns_name 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) except Exception, reason: print("Unable to connect to DC '%s' for domain '%s' : %s" % (server, domain, reason)) -- cgit