diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-01-24 16:17:45 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-01-24 16:17:45 +1100 |
commit | 48e79659d1a81bb5a5dd3932f9e8f7c0b1a99947 (patch) | |
tree | adae2ca2c51bddf3f3faf69c447f2f8eb2dcc780 /source4/scripting | |
parent | a2d7a3b627842b70cfe2aa8318ce5b7353989261 (diff) | |
download | samba-48e79659d1a81bb5a5dd3932f9e8f7c0b1a99947.tar.gz samba-48e79659d1a81bb5a5dd3932f9e8f7c0b1a99947.tar.bz2 samba-48e79659d1a81bb5a5dd3932f9e8f7c0b1a99947.zip |
Make the repl_meta_data module the default for domain controllers.
Andrew Bartlett
(This used to be commit ae2ea1bd0cd2b326b09b372428969f2cf52ce519)
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/libjs/provision.js | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js index b782d948be..4cb717bde8 100644 --- a/source4/scripting/libjs/provision.js +++ b/source4/scripting/libjs/provision.js @@ -610,10 +610,21 @@ function provision(subobj, message, blank, paths, session_info, credentials, lda var lp = loadparm_init(); var sys = sys_init(); var info = new Object(); + random_init(local); var ok = provision_fix_subobj(subobj, paths); assert(ok); + if (strlower(subobj.SERVERROLE) == strlower("domain controller")) { + if (subobj.BACKEND_MOD == undefined) { + subobj.BACKEND_MOD = "repl_meta_data"; + } + } else { + if (subobj.BACKEND_MOD == undefined) { + subobj.BACKEND_MOD = "objectguid"; + } + } + if (subobj.DOMAINGUID != undefined) { subobj.DOMAINGUID_MOD = sprintf("replace: objectGUID\nobjectGUID: %s\n-", subobj.DOMAINGUID); } else { @@ -693,7 +704,19 @@ function provision(subobj, message, blank, paths, session_info, credentials, lda samdb.set_domain_sid(subobj.DOMAINSID); - samdb.set_ntds_invocationId(subobj.INVOCATIONID); + if (strlower(subobj.SERVERROLE) == strlower("domain controller")) { + if (subobj.INVOCATIONID == undefined) { + subobj.INVOCATIONID = randguid(); + } + samdb.set_ntds_invocationId(subobj.INVOCATIONID); + if (subobj.BACKEND_MOD == undefined) { + subobj.BACKEND_MOD = "repl_meta_data"; + } + } else { + if (subobj.BACKEND_MOD == undefined) { + subobj.BACKEND_MOD = "objectguid"; + } + } var load_schema_ok = load_schema(subobj, message, samdb); assert(load_schema_ok.is_ok); @@ -960,7 +983,6 @@ function provision_guess() subobj.VERSION = version(); subobj.HOSTIP = hostip(); subobj.DOMAINSID = randsid(); - subobj.INVOCATIONID = randguid(); subobj.POLICYGUID = randguid(); subobj.KRBTGTPASS = randpass(12); subobj.MACHINEPASS = randpass(12); @@ -1012,9 +1034,6 @@ function provision_guess() subobj.DOMAINDN_MOD = "pdc_fsmo,password_hash,instancetype"; subobj.CONFIGDN_MOD = "naming_fsmo,instancetype"; subobj.SCHEMADN_MOD = "schema_fsmo,instancetype"; - subobj.DOMAINDN_MOD2 = ",repl_meta_data"; - subobj.CONFIGDN_MOD2 = ",repl_meta_data"; - subobj.SCHEMADN_MOD2 = ",repl_meta_data"; subobj.ACI = "# no aci for local ldb"; |