summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-11-11 16:34:48 +0100
committerStefan Metzmacher <metze@samba.org>2011-11-15 09:46:26 +0100
commite6a9e1dda920d83c2926061e331d52aa9e9d0871 (patch)
tree7e9020cad9b774945fc1d03e5d887757f22b97c8 /source4/scripting
parent18eba021e7b7e0b9a6fb228c80bee639965dab33 (diff)
downloadsamba-e6a9e1dda920d83c2926061e331d52aa9e9d0871.tar.gz
samba-e6a9e1dda920d83c2926061e331d52aa9e9d0871.tar.bz2
samba-e6a9e1dda920d83c2926061e331d52aa9e9d0871.zip
s4:dsdb/pydsdb: pass down schema_dn to _dsdb_set_schema_from_ldif()
metze
Diffstat (limited to 'source4/scripting')
-rwxr-xr-xsource4/scripting/bin/upgradeprovision7
-rw-r--r--source4/scripting/python/samba/schema.py2
2 files changed, 5 insertions, 4 deletions
diff --git a/source4/scripting/bin/upgradeprovision b/source4/scripting/bin/upgradeprovision
index 0a3df32854..f4031206c9 100755
--- a/source4/scripting/bin/upgradeprovision
+++ b/source4/scripting/bin/upgradeprovision
@@ -1101,7 +1101,8 @@ def reload_full_schema(samdb, names):
:param names: List of key provision parameters
"""
- current = samdb.search(expression="objectClass=*", base=str(names.schemadn),
+ schemadn = str(names.schemadn)
+ current = samdb.search(expression="objectClass=*", base=schemadn,
scope=SCOPE_SUBTREE)
schema_ldif = ""
prefixmap_data = ""
@@ -1113,9 +1114,9 @@ def reload_full_schema(samdb, names):
prefixmap_data = b64encode(prefixmap_data)
# We don't actually add this ldif, just parse it
- prefixmap_ldif = "dn: cn=schema\nprefixMap:: %s\n\n" % prefixmap_data
+ prefixmap_ldif = "dn: %s\nprefixMap:: %s\n\n" % (schemadn, prefixmap_data)
- dsdb._dsdb_set_schema_from_ldif(samdb, prefixmap_ldif, schema_ldif)
+ dsdb._dsdb_set_schema_from_ldif(samdb, prefixmap_ldif, schema_ldif, schemadn)
def update_partition(ref_samdb, samdb, basedn, names, schema, provisionUSNs, prereloadfunc):
diff --git a/source4/scripting/python/samba/schema.py b/source4/scripting/python/samba/schema.py
index 216cb0ff27..9cbfa3a8e8 100644
--- a/source4/scripting/python/samba/schema.py
+++ b/source4/scripting/python/samba/schema.py
@@ -120,7 +120,7 @@ class Schema(object):
self.set_from_ldif(prefixmap_ldif, self.schema_data, self.schemadn)
def set_from_ldif(self, pf, df, dn):
- dsdb._dsdb_set_schema_from_ldif(self.ldb, pf, df)
+ dsdb._dsdb_set_schema_from_ldif(self.ldb, pf, df, dn)
def write_to_tmp_ldb(self, schemadb_path):
self.ldb.connect(url=schemadb_path)