1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

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
This commit is contained in:
Andrew Tridgell 2010-12-01 16:40:17 +11:00
parent 00ecbdbbd1
commit b7172e7a71

View File

@ -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)