diff options
author | Stefan Metzmacher <metze@samba.org> | 2019-03-08 11:28:42 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-04-11 04:17:10 +0000 |
commit | 7652439fa1aab92945f5540a43fc49568d446917 (patch) | |
tree | b291a964dbc2f75cd7c3f94379504418731892fd | |
parent | 5ea84af2d69e0b3a2a801ea0cc3f4ffc66bf1764 (diff) | |
download | samba-7652439fa1aab92945f5540a43fc49568d446917.tar.gz |
python/provision: use provision and relax controls for schema provision
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13799
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
-rw-r--r-- | python/samba/provision/__init__.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/python/samba/provision/__init__.py b/python/samba/provision/__init__.py index 957cdaaf874..2bb2614e629 100644 --- a/python/samba/provision/__init__.py +++ b/python/samba/provision/__init__.py @@ -1198,7 +1198,8 @@ def setup_self_join(samdb, admin_session_info, names, fill, machinepass, setup_path("provision_self_join_modify_schema.ldif"), { "SCHEMADN": names.schemadn, "SERVERDN": names.serverdn, - }) + }, + controls=["provision:0", "relax:0"]) setup_modify_ldif(samdb, setup_path("provision_self_join_modify_config.ldif"), { "CONFIGDN": names.configdn, @@ -1416,16 +1417,20 @@ def fill_samdb(samdb, lp, names, logger, policyguid, # The LDIF here was created when the Schema object was constructed ignore_checks_oid = "local_oid:%s:0" % samba.dsdb.DSDB_CONTROL_SKIP_DUPLICATES_CHECK_OID + schema_controls = [ + "provision:0", + "relax:0", + ignore_checks_oid + ] + logger.info("Setting up sam.ldb schema") - samdb.add_ldif(schema.schema_dn_add, - controls=["relax:0", ignore_checks_oid]) - samdb.modify_ldif(schema.schema_dn_modify, - controls=[ignore_checks_oid]) + samdb.add_ldif(schema.schema_dn_add, controls=schema_controls) + samdb.modify_ldif(schema.schema_dn_modify, controls=schema_controls) samdb.write_prefixes_from_schema() - samdb.add_ldif(schema.schema_data, controls=["relax:0", ignore_checks_oid]) + samdb.add_ldif(schema.schema_data, controls=schema_controls) setup_add_ldif(samdb, setup_path("aggregate_schema.ldif"), {"SCHEMADN": names.schemadn}, - controls=["relax:0", ignore_checks_oid]) + controls=schema_controls) # Now register this container in the root of the forest msg = ldb.Message(ldb.Dn(samdb, names.domaindn)) |