From 9ec7a3dfbee13191fc6e3be5bc9fc432a678c1e8 Mon Sep 17 00:00:00 2001 From: kakwa Date: Tue, 28 Jul 2015 23:38:29 +0200 Subject: [PATCH] fix rename in modify when renaming an entry, dn must be reset to the correct value for the modifications that come after the rename. --- ldapcherry/backend/backendLdap.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ldapcherry/backend/backendLdap.py b/ldapcherry/backend/backendLdap.py index 8819e8a..a68cb7b 100644 --- a/ldapcherry/backend/backendLdap.py +++ b/ldapcherry/backend/backendLdap.py @@ -311,6 +311,9 @@ class Backend(ldapcherry.backend.Backend): dn, ldap.dn.dn2str([[(battr, bcontent, 1)]]) ) + dn = ldap.dn.dn2str( + [[(battr, bcontent, 1)]] + ldap.dn.str2dn(dn)[1:] + ) else: if attr in old_attrs: if type(old_attrs[attr]) is list: