diff options
author | Andrew Bartlett <abartlet@samba.org> | 2007-10-29 21:25:26 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:43:43 +0100 |
commit | 16d039504763139f1221c3ff4643d1a5cb2bdc87 (patch) | |
tree | 1330820925ce7f173ebac4675c37801692ae6809 /source4/scripting | |
parent | bb96624d68b3b947b1555bce97e479b72cb545d4 (diff) | |
download | samba-16d039504763139f1221c3ff4643d1a5cb2bdc87.tar.gz samba-16d039504763139f1221c3ff4643d1a5cb2bdc87.tar.bz2 samba-16d039504763139f1221c3ff4643d1a5cb2bdc87.zip |
r25750: Update the objectclass module to improve consistency in Samba4.
The aim here is to ensure that if we have
CN=Users,DC=samba,DC=example,DC=com
that we cannot have a DN of the form
cn=admin ,cn=useRS,DC=samba,DC=example,DC=com
This module pulls apart the DN, fixes up the relative DN part, and
searches for the parent to copy the base from.
I've used the objectclass module, as I intend to also validate the
placement of child objects, by reading the allowedChildClasses virtual
attribute.
In the future, I'll also force the attribute names to be consistant
(using the case from the schema).
Andrew Bartlett
(This used to be commit c0a0c69ac5a81cfcb7c7d5ba38db59f8686c30ab)
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/libjs/provision.js | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js index ef43ed721d..5ca7be99e5 100644 --- a/source4/scripting/libjs/provision.js +++ b/source4/scripting/libjs/provision.js @@ -631,6 +631,16 @@ function provision(subobj, message, blank, paths, session_info, credentials, lda message("Erasing data from partitions\n"); ldb_erase_partitions(info, samdb, ldapbackend); + // (hack) Reload, now we have the partitions and rootdse loaded. + var commit_ok = samdb.transaction_commit(); + if (!commit_ok) { + info.message("samdb commit failed: " + samdb.errstring() + "\n"); + assert(commit_ok); + } + samdb.close(); + + samdb = open_ldb(info, paths.samdb, false); + message("Adding DomainDN: " + subobj.DOMAINDN + " (permitted to fail)\n"); var add_ok = setup_add_ldif("provision_basedn.ldif", info, samdb, true); message("Modifying DomainDN: " + subobj.DOMAINDN + "\n"); @@ -951,20 +961,21 @@ function provision_guess() // // Some Known ordering constraints: // - rootdse must be first, as it makes redirects from "" -> cn=rootdse - // - samldb must be before password_hash, because password_hash checks - // that the objectclass is of type person (filled in by samldb) + // - objectclass must be before password_hash, because password_hash checks + // that the objectclass is of type person (filled in by the objectclass + // module when expanding the objectclass list) // - partition must be last // - each partition has its own module list then modules_list = new Array("rootdse", - "kludge_acl", "paged_results", "server_sort", "extended_dn", "asq", "samldb", - "operational", - "objectclass", "rdn_name", + "objectclass", + "kludge_acl", + "operational", "subtree_rename", "linked_attributes", "show_deleted", |