]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python/provision: use provision and relax controls for schema provision
authorStefan Metzmacher <metze@samba.org>
Fri, 8 Mar 2019 10:28:42 +0000 (11:28 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 13 Jun 2019 10:21:58 +0000 (10:21 +0000)
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>
(cherry picked from commit 7652439fa1aab92945f5540a43fc49568d446917)

python/samba/provision/__init__.py

index f64ac6eac1141bac27ff1465d3b7bb3b40841d57..aceb6a86a9495600a329fb37d197015a2a27824b 100644 (file)
@@ -1187,7 +1187,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,
@@ -1406,16 +1407,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))