summaryrefslogtreecommitdiff
path: root/source4/scripting/bin/upgradeprovision
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-06-20 02:32:23 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-06-20 02:46:57 +0200
commit94e06fe2032b0143939abd85044b5c3ccddefe70 (patch)
tree887f6600128d3e32de674e60e75ee74bd0262766 /source4/scripting/bin/upgradeprovision
parentd3d7ff66d4a7952a50e7d9175528985358cb3522 (diff)
downloadsamba-94e06fe2032b0143939abd85044b5c3ccddefe70.tar.gz
samba-94e06fe2032b0143939abd85044b5c3ccddefe70.tar.bz2
samba-94e06fe2032b0143939abd85044b5c3ccddefe70.zip
Some more formatting fixes, move schema related functions from Ldb to Schema.
Diffstat (limited to 'source4/scripting/bin/upgradeprovision')
-rwxr-xr-xsource4/scripting/bin/upgradeprovision9
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/scripting/bin/upgradeprovision b/source4/scripting/bin/upgradeprovision
index 1c33132769..47e50ece57 100755
--- a/source4/scripting/bin/upgradeprovision
+++ b/source4/scripting/bin/upgradeprovision
@@ -107,7 +107,7 @@ hashOverwrittenAtt = { "prefixMap": replace, "systemMayContain": replace,
backlinked = []
-forwardlinked = {}
+forwardlinked = set()
dn_syntax_att = []
def define_what_to_log(opts):
what = 0
@@ -223,7 +223,8 @@ def populate_links(samdb, schemadn):
linkedAttHash = get_linked_attributes(Dn(samdb, str(schemadn)), samdb)
backlinked.extend(linkedAttHash.values())
for t in linkedAttHash.keys():
- forwardlinked[t] = 1
+ forwardlinked.add(t)
+
def populate_dnsyntax(samdb, schemadn):
"""Populate an array with all the attributes that have DN synthax
@@ -777,7 +778,7 @@ def update_present(ref_samdb, samdb, basedn, listPresent, usns, invocationid):
if usns is not None:
# We have updated by provision usn information so let's exploit
# replMetadataProperties
- if forwardlinked.has_key(att):
+ if att in forwardlinked:
handle_links(samdb, att, basedn, current[0]["dn"],
current[0][att], reference[0][att], delta)
@@ -952,7 +953,7 @@ def update_partition(ref_samdb, samdb, basedn, names, schema, provisionUSNs):
# a complete schema is needed as the insertion of attributes
# and class is done against it
# and the schema is self validated
- samdb.set_schema_from_ldb(schema.ldb)
+ samdb.set_schema(schema)
try:
message(SIMPLE, "There are %d missing objects" % (len(listMissing)))
add_deletedobj_containers(ref_samdb, samdb, names)