diff --git a/mylib/ldap.py b/mylib/ldap.py index 924252f..fbdd0ca 100644 --- a/mylib/ldap.py +++ b/mylib/ldap.py @@ -850,7 +850,7 @@ class LdapClient: ) return False - def update_object(self, ldap_obj, changes, protected_attrs=None, rdn_attr=None): + def update_object(self, ldap_obj, changes, protected_attrs=None, rdn_attr=None, relax=False): """ Update an object @@ -858,6 +858,7 @@ class LdapClient: :param changes: The changes to make on LDAP object (as formated by get_changes() method) :param protected_attrs: An optional list of protected attributes :param rdn_attr: The LDAP object RDN attribute (to detect renaming, default: auto-detected) + :param rdn_attr: Enable relax modification server control (optional, default: false) """ assert ( isinstance(changes, (list, tuple)) @@ -922,7 +923,7 @@ class LdapClient: return True assert self._conn or self.initialize() return self._conn.update_object( - ldap_obj["dn"], _changes[0], _changes[1], ignore_attrs=protected_attrs + ldap_obj["dn"], _changes[0], _changes[1], ignore_attrs=protected_attrs, relax=relax ) except LdapServerException: log.error(