1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

s4/torture/drs/python: py2/py3 compat changes for samba4.drs.repl_rodc

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Noel Power
2018-06-15 17:55:46 +01:00
committed by Andrew Bartlett
parent bcefbbb3ab
commit 0ed0c07dd5
2 changed files with 7 additions and 5 deletions

View File

@ -50,6 +50,7 @@ import re
import os
import tempfile
from samba.compat import text_type
from samba.compat import get_string
class DCJoinException(Exception):
@ -398,7 +399,7 @@ class DCJoinContext(object):
so only used for RODC join'''
res = ctx.samdb.search(base="", scope=ldb.SCOPE_BASE, attrs=["tokenGroups"])
binsid = res[0]["tokenGroups"][0]
return ctx.samdb.schema_format_value("objectSID", binsid)
return get_string(ctx.samdb.schema_format_value("objectSID", binsid))
def dn_exists(ctx, dn):
'''check if a DN exists'''