Visitar URL original
docs(ldap.modlist): correct guidance on replacements in LDAP modlist by spaceone · Pull Request #661 · python-ldap/python-ldap · GitHub
Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions Doc/reference/ldap-modlist.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,13 @@ The :mod:`ldap.modlist` module defines the following functions:
unnecessary changes (e.g. case of attribute type names in DNs).

.. note::
Replacing attribute values is always done with a
:py:const:`ldap.MOD_DELETE`/:py:const:`ldap.MOD_ADD` pair instead of
:py:const:`ldap.MOD_REPLACE` to work-around potential issues with
attributes for which no EQUALITY matching rule are defined in the
server's subschema. This works correctly in most situations but
rarely fails with some LDAP servers implementing (schema) checks on
transient state entry during processing the modify operation.
Replacing attribute values would normally be done with
:py:const:`ldap.MOD_REPLACE`. Unlike deleting specific values,
:py:const:`ldap.MOD_REPLACE` does not require an EQUALITY matching rule
to be defined for the attribute in the server's subschema.

The modlist generated by this function uses a
:py:const:`ldap.MOD_DELETE`/:py:const:`ldap.MOD_ADD` pair instead, as a
work-around for potential issues with :py:const:`ldap.MOD_REPLACE` on
some LDAP servers. This may fail if the server performs schema checks
on the transient entry state while processing the modify operation.
Loading