summaryrefslogtreecommitdiffstats
path: root/python/samba/join.py
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2014-08-11 11:23:57 +1200
committerAndrew Bartlett <abartlet@samba.org>2014-09-01 00:36:42 +0200
commit964e412ead6af1ef2ccfba351161e9a865a251ac (patch)
tree1f19984ed871e6683b809ffc5beeffb176df4489 /python/samba/join.py
parentc9f613f60ddf61f27ff67a7bbef8b93022099335 (diff)
downloadsamba-964e412ead6af1ef2ccfba351161e9a865a251ac.tar.gz
samba-964e412ead6af1ef2ccfba351161e9a865a251ac.tar.xz
samba-964e412ead6af1ef2ccfba351161e9a865a251ac.zip
python: Use the security.dom_sid type for ctx.domsid in join.py and provision
Change-Id: I1266f77184d68aae6a39a73bac8a432fdd707b2e Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'python/samba/join.py')
-rw-r--r--python/samba/join.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/python/samba/join.py b/python/samba/join.py
index 63f83767e0..59e4d5c1a5 100644
--- a/python/samba/join.py
+++ b/python/samba/join.py
@@ -94,7 +94,7 @@ class dc_join(object):
ctx.root_dn = str(ctx.samdb.get_root_basedn())
ctx.schema_dn = str(ctx.samdb.get_schema_basedn())
ctx.config_dn = str(ctx.samdb.get_config_basedn())
- ctx.domsid = ctx.samdb.get_domain_sid()
+ ctx.domsid = security.dom_sid(ctx.samdb.get_domain_sid())
ctx.forestsid = ctx.domsid
ctx.domain_name = ctx.get_domain_name()
ctx.forest_domain_name = ctx.get_forest_domain_name()
@@ -372,7 +372,7 @@ class dc_join(object):
def create_tmp_samdb(ctx):
'''create a temporary samdb object for schema queries'''
- ctx.tmp_schema = Schema(security.dom_sid(ctx.domsid),
+ ctx.tmp_schema = Schema(ctx.domsid,
schemadn=ctx.schema_dn)
ctx.tmp_samdb = SamDB(session_info=system_session(), url=None, auto_connect=False,
credentials=ctx.creds, lp=ctx.lp, global_schema=False,
@@ -924,7 +924,7 @@ class dc_join(object):
realm=ctx.realm,
dnsdomain=ctx.dnsdomain,
netbiosname=ctx.myname,
- domainsid=security.dom_sid(ctx.domsid),
+ domainsid=ctx.domsid,
machinepass=ctx.acct_pass,
secure_channel_type=ctx.secure_channel_type,
key_version_number=ctx.key_version_number)
@@ -967,7 +967,7 @@ class dc_join(object):
info = lsa.TrustDomainInfoInfoEx()
info.domain_name.string = ctx.dnsdomain
info.netbios_name.string = ctx.domain_name
- info.sid = security.dom_sid(ctx.domsid)
+ info.sid = ctx.domsid
info.trust_direction = lsa.LSA_TRUST_DIRECTION_INBOUND | lsa.LSA_TRUST_DIRECTION_OUTBOUND
info.trust_type = lsa.LSA_TRUST_TYPE_UPLEVEL
info.trust_attributes = lsa.LSA_TRUST_ATTRIBUTE_WITHIN_FOREST
@@ -1210,7 +1210,7 @@ def join_subdomain(logger=None, server=None, creds=None, lp=None, site=None,
ctx.base_dn = samba.dn_from_dns_name(dnsdomain)
ctx.forestsid = ctx.domsid
- ctx.domsid = str(security.random_sid())
+ ctx.domsid = security.random_sid()
ctx.acct_dn = None
ctx.dnshostname = "%s.%s" % (ctx.myname.lower(), ctx.dnsdomain)
ctx.trustdom_pass = samba.generate_random_password(128, 128)