s4:provision Ensure we add the schema with the 'relax' control
authorAndrew Bartlett <abartlet@samba.org>
Fri, 25 Sep 2009 00:21:47 +0000 (17:21 -0700)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Fri, 2 Oct 2009 10:45:05 +0000 (12:45 +0200)
(allows addition of systemOnly classes)

source4/scripting/python/samba/provision.py

index c14870ecd0bf13bc83cdcb5ceee575ce0730f5bc..06b828896959f9bb12557ae11b2869ec4b36410f 100644 (file)
@@ -210,6 +210,8 @@ class Schema(object):
         prefixmap = open(setup_path("prefixMap.txt"), 'r').read()
         prefixmap = b64encode(prefixmap)
 
+        
+
         # We don't actually add this ldif, just parse it
         prefixmap_ldif = "dn: cn=schema\nprefixMap:: %s\n\n" % prefixmap
         self.ldb.set_schema_from_ldif(prefixmap_ldif, self.schema_data)
@@ -1052,10 +1054,10 @@ def setup_samdb(path, setup_path, session_info, credentials, lp,
 
         # The LDIF here was created when the Schema object was constructed
         message("Setting up sam.ldb schema")
-        samdb.add_ldif(schema.schema_dn_add)
+        samdb.add_ldif(schema.schema_dn_add, controls=["relax:0"])
         samdb.modify_ldif(schema.schema_dn_modify)
         samdb.write_prefixes_from_schema()
-        samdb.add_ldif(schema.schema_data)
+        samdb.add_ldif(schema.schema_data, controls=["relax:0"])
         setup_add_ldif(samdb, setup_path("aggregate_schema.ldif"), 
                        {"SCHEMADN": names.schemadn})