summaryrefslogtreecommitdiffstats
path: root/source4/scripting/bin
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2010-10-23 22:01:30 +0400
committerMatthieu Patou <mat@samba.org>2010-11-12 19:40:21 +0000
commit8227d1f68ef7a4750d23d0c34402dbc0c1d14a3e (patch)
tree3b42ea22d4b88524a712d7699998f09a7bab5145 /source4/scripting/bin
parent757764ab1bb3056377f050fd91b43bbc45a3c7a2 (diff)
downloadsamba-8227d1f68ef7a4750d23d0c34402dbc0c1d14a3e.tar.gz
samba-8227d1f68ef7a4750d23d0c34402dbc0c1d14a3e.tar.xz
samba-8227d1f68ef7a4750d23d0c34402dbc0c1d14a3e.zip
upgradeprovision: use the relax/(upgrade)provision when modifying object
For certain attribute we use the relax/provision control so that we try to respect checks as this is not a good idea to always force unwanted behavior.
Diffstat (limited to 'source4/scripting/bin')
-rwxr-xr-xsource4/scripting/bin/upgradeprovision9
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/scripting/bin/upgradeprovision b/source4/scripting/bin/upgradeprovision
index 4dd8f533be7..e1ef57193d6 100755
--- a/source4/scripting/bin/upgradeprovision
+++ b/source4/scripting/bin/upgradeprovision
@@ -984,10 +984,17 @@ def update_present(ref_samdb, samdb, basedn, listPresent, usns, invocationid):
delta.dn = dn
if len(delta.items()) >1:
attributes=", ".join(delta.keys())
+ modcontrols = []
+ relaxedatt = ['iscriticalsystemobject', 'grouptype']
+ # Let's try to reduce as much as possible the use of relax control
+ #for checkedatt in relaxedatt:
+ for attr in delta.keys():
+ if attr.lower() in relaxedatt:
+ modcontrols = ["relax:0", "local_oid:1.3.6.1.4.1.7165.4.3.16:0"]
message(CHANGE, "%s is different from the reference one, changed"
" attributes: %s\n" % (dn, attributes))
changed += 1
- samdb.modify(delta)
+ samdb.modify(delta, modcontrols)
return changed
def reload_full_schema(samdb, names):