summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-09-12 08:46:35 +0200
committerStefan Metzmacher <metze@samba.org>2012-09-12 16:51:29 +0200
commit50084e573218ffc06d6be59adda62083404405aa (patch)
tree1da0ca7a4f762ce8df20bb1a47ef6b57850aa0dd
parent6ff58847133f9a70746e6b6d64237e2816e8572c (diff)
downloadsamba-50084e573218ffc06d6be59adda62083404405aa.tar.gz
samba-50084e573218ffc06d6be59adda62083404405aa.tar.bz2
samba-50084e573218ffc06d6be59adda62083404405aa.zip
s4:provision: don't add the dns-HOSTNAME account if we use the internal dns server
metze
-rw-r--r--source4/scripting/python/samba/provision/__init__.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/source4/scripting/python/samba/provision/__init__.py b/source4/scripting/python/samba/provision/__init__.py
index 8b0737c226..5cbb71685b 100644
--- a/source4/scripting/python/samba/provision/__init__.py
+++ b/source4/scripting/python/samba/provision/__init__.py
@@ -967,7 +967,8 @@ def setup_samdb_rootdse(samdb, names):
def setup_self_join(samdb, admin_session_info, names, fill, machinepass,
- dnspass, domainsid, next_rid, invocationid, policyguid, policyguid_dc,
+ dns_backend, dnspass, domainsid, next_rid, invocationid,
+ policyguid, policyguid_dc,
domainControllerFunctionality, ntdsguid=None, dc_rid=None):
"""Join a host to its own domain."""
assert isinstance(invocationid, str)
@@ -1045,9 +1046,10 @@ def setup_self_join(samdb, admin_session_info, names, fill, machinepass,
samdb.set_session_info(admin_session_info)
- # This is Samba4 specific and should be replaced by the correct
- # DNS AD-style setup
- setup_add_ldif(samdb, setup_path("provision_dns_add_samba.ldif"), {
+ if dns_backend != "SAMBA_INTERNAL":
+ # This is Samba4 specific and should be replaced by the correct
+ # DNS AD-style setup
+ setup_add_ldif(samdb, setup_path("provision_dns_add_samba.ldif"), {
"DNSDOMAIN": names.dnsdomain,
"DOMAINDN": names.domaindn,
"DNSPASS_B64": b64encode(dnspass.encode('utf-16-le')),
@@ -1143,7 +1145,7 @@ def setup_samdb(path, session_info, provision_backend, lp, names,
def fill_samdb(samdb, lp, names,
logger, domainsid, domainguid, policyguid, policyguid_dc, fill,
- adminpass, krbtgtpass, machinepass, invocationid, dnspass, ntdsguid,
+ adminpass, krbtgtpass, machinepass, dns_backend, dnspass, invocationid, ntdsguid,
serverrole, am_rodc=False, dom_for_fun_level=None, schema=None,
next_rid=None, dc_rid=None):
@@ -1331,6 +1333,7 @@ def fill_samdb(samdb, lp, names,
logger.info("Setting up self join")
setup_self_join(samdb, admin_session_info, names=names, fill=fill,
invocationid=invocationid,
+ dns_backend=dns_backend,
dnspass=dnspass,
machinepass=machinepass,
domainsid=domainsid,
@@ -1622,7 +1625,8 @@ def provision_fill(samdb, secrets_ldb, logger, names, paths,
policyguid=policyguid, policyguid_dc=policyguid_dc,
fill=samdb_fill, adminpass=adminpass, krbtgtpass=krbtgtpass,
invocationid=invocationid, machinepass=machinepass,
- dnspass=dnspass, ntdsguid=ntdsguid, serverrole=serverrole,
+ dns_backend=dns_backend, dnspass=dnspass,
+ ntdsguid=ntdsguid, serverrole=serverrole,
dom_for_fun_level=dom_for_fun_level, am_rodc=am_rodc,
next_rid=next_rid, dc_rid=dc_rid)