1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-15 16:59:09 +03:00

samba-tool visualize: use correct DC in graph label

We have been using a random DC (depending to hash order, which was not
random enough on Python 2.7 to affect the tests).

Reported-by: Noel Power <noel.power@suse.com>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <noel.power@suse.com>
This commit is contained in:
Douglas Bagnall
2018-04-20 10:52:31 +12:00
committed by Noel Power
parent a23d805475
commit f477a7585b
2 changed files with 13 additions and 8 deletions

View File

@ -392,7 +392,7 @@ class cmd_ntdsconn(GraphCommand):
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp, fallback_machine=True)
local_kcc, dsas = self.get_kcc_and_dsas(H, lp, creds)
local_dsa_dn = local_kcc.my_dsa_dnstr.split(',', 1)[1]
vertices = set()
attested_edges = []
for dsa_dn in dsas:
@ -452,7 +452,7 @@ class cmd_ntdsconn(GraphCommand):
# If we are not talking to remote servers, we list all
# the connections.
graph_edges = edges.keys()
title = 'NTDS Connections known to %s' % dsa_dn
title = 'NTDS Connections known to %s' % local_dsa_dn
epilog = ''
else:
@ -556,7 +556,7 @@ class cmd_ntdsconn(GraphCommand):
if talk_to_remote:
title = 'NTDS Connections'
else:
title = 'NTDS Connections known to %s' % dsa_dn
title = 'NTDS Connections known to %s' % local_dsa_dn
s = dot_graph(sorted(vertices), dot_edges,
directed=True,