diff options
author | Andrew Bartlett <abartlet@samba.org> | 2014-08-11 11:23:57 +1200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2014-09-01 00:36:42 +0200 |
commit | 964e412ead6af1ef2ccfba351161e9a865a251ac (patch) | |
tree | 1f19984ed871e6683b809ffc5beeffb176df4489 /python/samba/netcmd | |
parent | c9f613f60ddf61f27ff67a7bbef8b93022099335 (diff) | |
download | samba-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/netcmd')
-rw-r--r-- | python/samba/netcmd/domain.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py index 9e9b30df0e..fe34f9434b 100644 --- a/python/samba/netcmd/domain.py +++ b/python/samba/netcmd/domain.py @@ -35,6 +35,7 @@ from samba.join import join_RODC, join_DC, join_subdomain from samba.auth import system_session from samba.samdb import SamDB from samba.dcerpc import drsuapi +from samba.dcerpc import security from samba.dcerpc.samr import DOMAIN_PASSWORD_COMPLEX, DOMAIN_PASSWORD_STORE_CLEARTEXT from samba.netcmd import ( Command, @@ -406,6 +407,9 @@ class cmd_domain_provision(Command): if ldap_backend_forced_uri is not None: self.logger.warn("You have specified to use an fixed URI %s for connecting to your LDAP server backend. This is NOT RECOMMENDED, as our default communiation over ldapi:// is more secure and much less") + if domain_sid is not None: + domain_sid = security.dom_sid(domain_sid) + session = system_session() try: result = provision(self.logger, |