diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-11-26 14:57:39 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-11-27 16:05:04 +1100 |
commit | 09338e60bc0003abefd31902de721ecf8fee1552 (patch) | |
tree | a6899459ced6dc1d16f5c10e5acacb8891c411c7 /source4/scripting/python | |
parent | 4a52ee3cd591051f05c086d61769ad16b9c8df58 (diff) | |
download | samba-09338e60bc0003abefd31902de721ecf8fee1552.tar.gz samba-09338e60bc0003abefd31902de721ecf8fee1552.tar.bz2 samba-09338e60bc0003abefd31902de721ecf8fee1552.zip |
s4:provision Make setting the domain SID in the self join optional
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/provision.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py index 242951def3..2e7843ac03 100644 --- a/source4/scripting/python/samba/provision.py +++ b/source4/scripting/python/samba/provision.py @@ -572,7 +572,7 @@ def setup_samdb_partitions(samdb_path, setup_path, message, lp, session_info, def secretsdb_self_join(secretsdb, domain, - netbiosname, domainsid, machinepass, + netbiosname, machinepass, domainsid=None, realm=None, dnsdomain=None, keytab_path=None, key_version_number=1, @@ -607,7 +607,8 @@ def secretsdb_self_join(secretsdb, domain, msg["secret"] = [machinepass] msg["samAccountName"] = ["%s$" % netbiosname] msg["secureChannelType"] = [str(secure_channel_type)] - msg["objectSid"] = [ndr_pack(domainsid)] + if domainsid is not None: + msg["objectSid"] = [ndr_pack(domainsid)] res = secretsdb.search(base="cn=Primary Domains", attrs=attrs, @@ -1267,7 +1268,7 @@ def provision(setup_dir, message, session_info, # Only make a zone file on the first DC, it should be replicated with DNS replication if serverrole == "domain controller": - secretsdb_self_join(secrets_ldb, domain=domain, + secretsdb_self_join(secrets_ldb, domain=names.domain, realm=names.realm, dnsdomain=names.dnsdomain, netbiosname=names.netbiosname, |