summaryrefslogtreecommitdiff
path: root/source4/scripting/bin/samba_spnupdate
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-18 15:26:48 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-18 23:12:25 +0100
commit3f952aba2b98ef6dd00861c079b388c8f1652beb (patch)
tree0c04a5fd6bd454c05b4c9c1a888d672cad147518 /source4/scripting/bin/samba_spnupdate
parent1ce223017df86b35003a21198b388396e45a2f4d (diff)
downloadsamba-3f952aba2b98ef6dd00861c079b388c8f1652beb.tar.gz
samba-3f952aba2b98ef6dd00861c079b388c8f1652beb.tar.bz2
samba-3f952aba2b98ef6dd00861c079b388c8f1652beb.zip
s4-spnupdate: only enable NDR print at log level above 5
Diffstat (limited to 'source4/scripting/bin/samba_spnupdate')
-rwxr-xr-xsource4/scripting/bin/samba_spnupdate5
1 files changed, 4 insertions, 1 deletions
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))