mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
python/samba: changes needed for samba.tests.samba_tool.visualize PY2/PY3
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
bff4d80a23
commit
471163e82e
@ -994,7 +994,7 @@ class NTDSConnection(object):
|
||||
self.schedule = ndr_unpack(drsblobs.schedule, msg["schedule"][0])
|
||||
|
||||
if "whenCreated" in msg:
|
||||
self.whenCreated = ldb.string_to_time(msg["whenCreated"][0])
|
||||
self.whenCreated = ldb.string_to_time(str(msg["whenCreated"][0]))
|
||||
|
||||
if "fromServer" in msg:
|
||||
dsdn = dsdb_Dn(samdb, msg["fromServer"][0].decode('utf8'))
|
||||
|
@ -275,7 +275,7 @@ class cmd_reps(GraphCommand):
|
||||
res = local_kcc.samdb.search(dsa_dn,
|
||||
scope=SCOPE_BASE,
|
||||
attrs=["dNSHostName"])
|
||||
dns_name = res[0]["dNSHostName"][0]
|
||||
dns_name = str(res[0]["dNSHostName"][0])
|
||||
print("Attempting to contact ldap://%s (%s)" %
|
||||
(dns_name, dsa_dn),
|
||||
file=sys.stderr)
|
||||
@ -508,7 +508,7 @@ class cmd_ntdsconn(GraphCommand):
|
||||
for msg in res:
|
||||
msgdn = str(msg.dn)
|
||||
dest_dn = msgdn[msgdn.index(',') + 1:]
|
||||
attested_edges.append((msg['fromServer'][0],
|
||||
attested_edges.append((str(msg['fromServer'][0]),
|
||||
dest_dn, ntds_dn))
|
||||
|
||||
if importldif and H == self._tmp_fn_to_delete:
|
||||
@ -694,7 +694,7 @@ class cmd_uptodateness(GraphCommand):
|
||||
expression=("(&(invocationId=%s)"
|
||||
"(objectClass=nTDSDSA))" % inv_id),
|
||||
attrs=["distinguishedName", "invocationId"])
|
||||
settings_dn = res[0]["distinguishedName"][0]
|
||||
settings_dn = str(res[0]["distinguishedName"][0])
|
||||
prefix, dsa_dn = settings_dn.split(',', 1)
|
||||
if prefix != 'CN=NTDS Settings':
|
||||
raise CommandError("Expected NTDS Settings DN, got %s" %
|
||||
|
Loading…
x
Reference in New Issue
Block a user