diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-02-05 10:34:51 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-02-07 13:22:01 +1100 |
commit | d1e5a7380619043a351ba8a25ebb8031163e70b7 (patch) | |
tree | dfb73691356940c847265086d7100286f864b010 /source4/scripting/python/samba/join.py | |
parent | 4ae013c01b2936e7fd80e674a617f10b54179010 (diff) | |
download | samba-d1e5a7380619043a351ba8a25ebb8031163e70b7.tar.gz samba-d1e5a7380619043a351ba8a25ebb8031163e70b7.tar.xz samba-d1e5a7380619043a351ba8a25ebb8031163e70b7.zip |
s4-provision Remove setup_path, setup_dir and find_setup_dir
We now have a reliable way to know the current location of the
templates: dyn_SETUPDIR, which is updated for both the in-build and
installed binaries.
This replaces the function arguments and the distributed resolution of
the setup directory with one 'global' function (imported as required).
This also removes the ability to specify an alternate setup directory
on the command line, as this was rarely if ever used and never tested.
Andrew Bartlett
Diffstat (limited to 'source4/scripting/python/samba/join.py')
-rw-r--r-- | source4/scripting/python/samba/join.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source4/scripting/python/samba/join.py b/source4/scripting/python/samba/join.py index 6e4cb583c9..401f262154 100644 --- a/source4/scripting/python/samba/join.py +++ b/source4/scripting/python/samba/join.py @@ -27,7 +27,7 @@ import ldb, samba, sys, os, uuid from samba.ndr import ndr_pack from samba.dcerpc import security, drsuapi, misc, nbt from samba.credentials import Credentials, DONT_USE_KERBEROS -from samba.provision import secretsdb_self_join, provision, FILL_DRS, find_setup_dir +from samba.provision import secretsdb_self_join, provision, FILL_DRS from samba.schema import Schema from samba.net import Net import logging @@ -100,7 +100,6 @@ class dc_join(object): ctx.acct_dn = "CN=%s,OU=Domain Controllers,%s" % (ctx.myname, ctx.base_dn) - ctx.setup_dir = find_setup_dir() ctx.tmp_samdb = None ctx.SPNs = [ "HOST/%s" % ctx.myname, @@ -245,9 +244,7 @@ class dc_join(object): def create_tmp_samdb(ctx): '''create a temporary samdb object for schema queries''' - def setup_path(file): - return os.path.join(ctx.setup_dir, file) - ctx.tmp_schema = Schema(setup_path, security.dom_sid(ctx.domsid), + ctx.tmp_schema = Schema(security.dom_sid(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, @@ -424,7 +421,7 @@ class dc_join(object): logger.addHandler(logging.StreamHandler(sys.stdout)) smbconf = ctx.lp.configfile - presult = provision(ctx.setup_dir, logger, system_session(), None, + presult = provision(logger, system_session(), None, smbconf=smbconf, targetdir=ctx.targetdir, samdb_fill=FILL_DRS, realm=ctx.realm, rootdn=ctx.root_dn, domaindn=ctx.base_dn, schemadn=ctx.schema_dn, |