summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsource4/scripting/python/samba/upgradehelpers.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/upgradehelpers.py b/source4/scripting/python/samba/upgradehelpers.py
index a10c6d39da..5bd341cedc 100755
--- a/source4/scripting/python/samba/upgradehelpers.py
+++ b/source4/scripting/python/samba/upgradehelpers.py
@@ -421,8 +421,9 @@ def identic_rename(ldbobj, dn):
:param dn: DN of the object to manipulate
"""
(before, after) = str(dn).split('=', 1)
- ldbobj.rename(dn, ldb.Dn(ldbobj, "%s=foo%s" % (before, after)))
- ldbobj.rename(ldb.Dn(ldbobj, "%s=foo%s" % (before, after)), dn)
+ # we need to use relax to avoid the subtree_rename constraints
+ ldbobj.rename(dn, ldb.Dn(ldbobj, "%s=foo%s" % (before, after)), ["relax:0"])
+ ldbobj.rename(ldb.Dn(ldbobj, "%s=foo%s" % (before, after)), dn, ["relax:0"])
def chunck_acl(acl):