summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-12-01 16:40:17 +1100
committerAndrew Tridgell <tridge@samba.org>2010-12-01 07:48:18 +0100
commitb7172e7a71b152be687fe5045565c8cd99a73a18 (patch)
tree720b947ce09a1a4a3a558d7ef8788c7ab6937f90 /source4/scripting
parent00ecbdbbd13ba191400c6f4185df2dd8e72d1459 (diff)
downloadsamba-b7172e7a71b152be687fe5045565c8cd99a73a18.tar.gz
samba-b7172e7a71b152be687fe5045565c8cd99a73a18.tar.bz2
samba-b7172e7a71b152be687fe5045565c8cd99a73a18.zip
s4-drs: cope with invalid NTDS DNs from DsReplicaInfo()
w2k3 sometimes returns a deleted DN Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Wed Dec 1 07:48:19 CET 2010 on sn-devel-104
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/netcmd/drs.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/netcmd/drs.py b/source4/scripting/python/samba/netcmd/drs.py
index 7cdb0e845a..404084426a 100644
--- a/source4/scripting/python/samba/netcmd/drs.py
+++ b/source4/scripting/python/samba/netcmd/drs.py
@@ -98,9 +98,12 @@ class cmd_drs_showrepl(Command):
def print_neighbour(self, n):
'''print one set of neighbour information'''
- (site, server) = drs_parse_ntds_dn(n.source_dsa_obj_dn)
print("%s" % n.naming_context_dn)
- print("\t%s\%s via RPC" % (site, server))
+ try:
+ (site, server) = drs_parse_ntds_dn(n.source_dsa_obj_dn)
+ print("\t%s\%s via RPC" % (site, server))
+ except RuntimeError:
+ print("\tNTDS DN: %s" % n.source_dsa_obj_dn)
print("\t\tDSA object GUID: %s" % n.source_dsa_obj_guid)
print("\t\tLast attempt @ %s %s" % (nttime2string(n.last_attempt), drs_errmsg(n.result_last_attempt)))
print("\t\t%u consecutive failure(s)." % n.consecutive_sync_failures)