1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-12 04:59:09 +03:00

s4-provision: Create ldap records for DNS partitions similar to windows

this allows easy comparison between windows and samba ldap trees

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Wed Nov  9 08:27:46 CET 2011 on sn-devel-104
This commit is contained in:
Amitay Isaacs
2011-09-20 17:33:20 +10:00
committed by Amitay Isaacs
parent a807c83641
commit 0c2f91c6b2
2 changed files with 3 additions and 5 deletions

View File

@ -278,7 +278,6 @@ def add_dns_container(samdb, domaindn, prefix, domainsid):
sec = security.descriptor.from_sddl(sddl, domainsid)
msg = ldb.Message(ldb.Dn(samdb, "CN=MicrosoftDNS,%s,%s" % (prefix, domaindn)))
msg["objectClass"] = ["top", "container"]
msg["displayName"] = ldb.MessageElement("DNS Servers", ldb.FLAG_MOD_ADD, "displayName")
msg["nTSecurityDescriptor"] = ndr_pack(sec)
samdb.add(msg)
@ -311,6 +310,7 @@ def add_rootservers(samdb, domaindn, prefix):
# Add DC=RootDNSServers,CN=MicrosoftDNS,<PREFIX>,<DOMAINDN>
msg = ldb.Message(ldb.Dn(samdb, container_dn))
msg["objectClass"] = ["top", "dnsZone"]
msg["cn"] = ldb.MessageElement("Zone", ldb.FLAG_MOD_ADD, "cn")
samdb.add(msg)
# Add DC=@,DC=RootDNSServers,CN=MicrosoftDNS,<PREFIX>,<DOMAINDN>