diff --git a/Doc/Makefile b/Doc/Makefile index 5c8c6f1..9ce697a 100644 --- a/Doc/Makefile +++ b/Doc/Makefile @@ -1,68 +1,68 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d .build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html web htmlhelp latex changes linkcheck - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " web to make files usable by Sphinx.web" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " changes to make an overview over all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - -clean: - -rm -rf .build/* - -html: - mkdir -p .build/html .build/doctrees - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) .build/html - @echo - @echo "Build finished. The HTML pages are in .build/html." - -web: - mkdir -p .build/web .build/doctrees - $(SPHINXBUILD) -b web $(ALLSPHINXOPTS) .build/web - @echo - @echo "Build finished; now you can run" - @echo " python -m sphinx.web .build/web" - @echo "to start the server." - -htmlhelp: - mkdir -p .build/htmlhelp .build/doctrees - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) .build/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in .build/htmlhelp." - -latex: - mkdir -p .build/latex .build/doctrees - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) .build/latex - @echo - @echo "Build finished; the LaTeX files are in .build/latex." - @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ - "run these through (pdf)latex." - -changes: - mkdir -p .build/changes .build/doctrees - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) .build/changes - @echo - @echo "The overview file is in .build/changes." - -linkcheck: - mkdir -p .build/linkcheck .build/doctrees - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) .build/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in .build/linkcheck/output.txt." +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d .build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html web htmlhelp latex changes linkcheck + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " web to make files usable by Sphinx.web" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " changes to make an overview over all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + +clean: + -rm -rf .build/* + +html: + mkdir -p .build/html .build/doctrees + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) .build/html + @echo + @echo "Build finished. The HTML pages are in .build/html." + +web: + mkdir -p .build/web .build/doctrees + $(SPHINXBUILD) -b web $(ALLSPHINXOPTS) .build/web + @echo + @echo "Build finished; now you can run" + @echo " python -m sphinx.web .build/web" + @echo "to start the server." + +htmlhelp: + mkdir -p .build/htmlhelp .build/doctrees + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) .build/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in .build/htmlhelp." + +latex: + mkdir -p .build/latex .build/doctrees + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) .build/latex + @echo + @echo "Build finished; the LaTeX files are in .build/latex." + @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ + "run these through (pdf)latex." + +changes: + mkdir -p .build/changes .build/doctrees + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) .build/changes + @echo + @echo "The overview file is in .build/changes." + +linkcheck: + mkdir -p .build/linkcheck .build/doctrees + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) .build/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in .build/linkcheck/output.txt." diff --git a/Doc/conf.py b/Doc/conf.py index 63fc24e..9314231 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -17,7 +17,7 @@ # If your extensions are in another directory, add it here. _doc_dir = os.path.dirname(__file__) sys.path.append(_doc_dir) -sys.path.append(os.path.join(_doc_dir, '../Lib/')) +sys.path.insert(0, os.path.join(_doc_dir, '../Lib/')) sys.path.insert(0, os.path.join(_doc_dir, '../Lib/ldap')) # Import fake `_ldap` module diff --git a/Doc/faq.rst b/Doc/faq.rst new file mode 100644 index 0000000..511735a --- /dev/null +++ b/Doc/faq.rst @@ -0,0 +1,184 @@ +python-ldap FAQ +=============== + +Project +------- + +**Q**: Is python-ldap yet another abandon-ware project? + + **A1**: “Jump on in.” + + **A2**: “Jump into the C ;-)” + + **A3**: see file CHANGES in source distribution + or `repository`_. + +.. _repository: https://github.com/python-ldap/python-ldap/blob/master/CHANGES + + +Usage +----- + +**Q**: Does it work with Python 3? + + **A0**: Yes, from 3.0 on. + + **A1**. For earlier versions, there's `pyldap`_, an independent fork + now merged into pyhon-ldap. + +.. _pyldap: https://pypi.python.org/pypi/pyldap + + +**Q**: Does it work with Python 2.6? (1.5|2.0|2.1|2.2|2.3|2.4|2.5)? + + **A**: No. Old versions of python-ldap are still available from PyPI, though. + + +**Q**: My code imports module ``_ldap``. +That used to work but from version 2.0.0pre that does not work anymore? + + **A**: Despite some outdated programming examples the extension module + ``_ldap`` **MUST NOT** be imported directly unless + you really know what you're doing (e.g. for internal regression testing). + + Import ``ldap`` instead which is a Python wrapper around ``_ldap`` + providing the full functionality. + +**Q**: My script bound to MS Active Directory but a a search operation results +in an exception :exc:`ldap.OPERATIONS_ERROR` with the diagnostic messages text +"In order to perform this operation a successful bind must be +completed on the connection." +What's happening here? + + **A**: When searching from the domain level MS AD returns referrals (search continuations) + for some objects to indicate to the client where to look for these objects. + Client-chasing of referrals is a broken concept since LDAPv3 does not specify + which credentials to use when chasing the referral. Windows clients are supposed + to simply use their Windows credentials but this does not work in general when + chasing referrals received from and pointing to arbitrary LDAP servers. + + Therefore per default ``libldap`` automatically chases the referrals + internally with an *anonymous* access which fails with MS AD. + + So best thing is to switch this behaviour off:: + + l = ldap.initialize('ldap://foobar') + l.set_option(ldap.OPT_REFERRALS,0) + +**Q**: Why am I seeing ``ldap.SUCCESS`` traceback as output? + + **A**: Most likely you are using one of the non-synchronous calls, and probably + mean to be using a synchronous call + (see detailed explanation in :ref:`sending-ldap-requests`. + +**Q**: Can I use LDAPv2 via python-ldap? + + **A**: Yes, by explicitly setting the class attribute + :attr:`~ldap.LDAPObject.protocol_version`. + + You should not do that nowadays since + `LDAPv2 is considered historic `_ + since many years. + + + +Installing +---------- + +**Q**: Does it work with Windows 32? + + **A**: You can find links to pre-compiled packages for Win32 on the + :ref:`Download information` page. + + +**Q**: Can python-ldap be built against OpenLDAP 2.3 libs or older? + + **A**: No, for recent python-ldap 2.4.x the OpenLDAP 2.4 client libs or newer are required. + Patched builds of python-ldap linked to older libs are not supported by the + python-ldap project. + + +**Q**: During build there are warning messages displayed +telling Lib/ldap.py and Lib/ldap/schema.py are not found:: + + warning: build_py: file Lib/ldap.py (for module ldap) not found + warning: build_py: file Lib/ldap/schema.py (for module ldap.schema) not found + +.. + + **A**: ``ldap`` and ``ldap.schema`` are both module packages + (directories containing various sub-modules). + The messages above are falsely produced by DistUtils. + Don't worry about it. + +.. _install-macosx: + +**Q**: What's the correct way to install on Mac OS X? + + **A**:: + + xcode-select --install + pip install python-ldap \ + --global-option=build_ext \ + --global-option="-I$(xcrun --show-sdk-path)/usr/include/sasl" + + +**Q**: While importing module ldap some shared lib files are not found. +Error message looks similar to this:: + + ImportError: ld.so.1: /usr/local/bin/python: fatal: liblber.so.2: open failed: No such file or directory + +.. + + **A1**: You need to make sure that the path to ``liblber.so.2`` and + ``libldap.so.2`` is in your ``LD_LIBRARY_PATH`` environment variable. + + **A2**: Alternatively if you're on Linux you can add the path to + ``liblber.so.2`` and ``libldap.so.2`` to ``/etc/ld.so.conf`` + and invoke command ``ldconfig`` afterwards. + + + +Historic +-------- + +**Q**: Can python-ldap 2.x be built against Netscape, Mozilla or Novell libs? + + **A**: Nope. + + +**Q**: My binary version of python-ldap was build with LDAP libs 3.3. +But the python-ldap docs say LDAP libs 2.x are needed. I'm confused! + + Short answer: + See answer above and :ref:`download information` for + a more recent version. + + Long answer: + E.g. some Win32 DLLs floating around for download are based on + the old Umich LDAP code which is not maintained anymore for + ``many`` years! Last Umich 3.3 release was 1997 if I remember correctly. + + The OpenLDAP project took over the Umich code and started releasing + OpenLDAP 1.x series mainly fixing bugs and doing some improvements + to the database backend. Still only LDAPv2 was supported at server + and client side. (Many commercial vendors also derived their products + from the Umich code.) + + OpenLDAP 2.x is a full-fledged LDAPv3 implementation. Still it has + its roots in Umich code but has many more features/improvements. + + +**Q**: While importing module ldap there are undefined references reported. +Error message looks similar to this:: + + ImportError: /usr/local/lib/libldap.so.2: undefined symbol: res_query + +.. + + **A**: Especially on older Linux systems you might have to explicitly link + against ``libresolv``. + + Tweak ``setup.cfg`` to contain this line:: + + libs = lber ldap resolv diff --git a/Doc/index.rst b/Doc/index.rst index 1f9bf6a..aa93092 100644 --- a/Doc/index.rst +++ b/Doc/index.rst @@ -1,80 +1,103 @@ -########################## -python-ldap Documentation -########################## - -.. topic:: Abstract - - This document describes the package python-ldap with its various modules. - - Depending on what you want to do this manual assumes basic to expert - knowledge about the Python language and the LDAP standard (LDAPv3). - - -******** -Contents -******** - -.. toctree:: - :maxdepth: 3 - - installing.rst - ldap.rst - ldap-async.rst - ldap-controls.rst - ldap-dn.rst - ldap-extop.rst - ldap-filter.rst - ldap-modlist.rst - ldap-resiter.rst - ldap-schema.rst - ldap-syncrepl.rst - ldap-sasl.rst - ldif.rst - ldapurl.rst - slapdtest.rst - - - -********************* -Bytes/text management -********************* - -The LDAP protocol states that some fields (distinguised names, relative distinguished names, -attribute names, queries) be encoded in UTF-8; some other (mostly attribute *values*) **MAY** -contain any type of data, and thus be treated as bytes. - -In Python 2, ``python-ldap`` used bytes for all fields, including those guaranteed to be text. -In order to support Python 3, this distinction is made explicit. This is done -through the ``bytes_mode`` flag to ``ldap.initialize()``. - -When porting from ``python-ldap`` 2.x, users are advised to update their code to set ``bytes_mode=False`` -on calls to these methods. -Under Python 2, ``python-pyldap`` aggressively checks the type of provided arguments, and will raise a ``TypeError`` -for any invalid parameter. -However, if the ``bytes_mode`` kwarg isn't provided, ``pyldap`` will only -raise warnings. - -The typical usage is as follows; note that only the result's *values* are of the bytes type: - -.. code-block:: pycon - - >>> import ldap - >>> con = ldap.initialize('ldap://localhost:389', bytes_mode=False) - >>> con.simple_bind_s('login', 'secret_password') - >>> results = con.search_s('ou=people,dc=example,dc=org', ldap.SCOPE_SUBTREE, "(cn=Raphaël)") - >>> results - [ - ("cn=Raphaël,ou=people,dc=example,dc=org", { - 'cn': [b'Rapha\xc3\xabl'], - 'sn': [b'Barrois'], - }), - ] - - -****************** -Indices and tables -****************** - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` +python-ldap +=========== + + +What is python-ldap? +-------------------- + +* python-ldap provides an object-oriented API to access LDAP + directory servers from `Python`_ programs. +* For LDAP operations the module wraps `OpenLDAP`_'s + client library *libldap* for that purpose. +* Additionally the package contains modules for other LDAP-related stuff: + + * LDIF + * LDAP URLs + * LDAPv3 subschema + +.. _Python: https://www.python.org/ +.. _OpenLDAP: https://www.openldap.org/ + + +Get it! +------- + +:ref:`Download information` is available for several platforms. + + +Mailing list +------------ + +Discussion about the use and future of Python-LDAP occurs in +the ``python-ldap@python.org`` mailing list. + +You can `subscribe or unsubscribe`_ to this list or browse the `list archive`_. + +.. _subscribe or unsubscribe: https://mail.python.org/mailman/listinfo/python-ldap +.. _list archive: https://mail.python.org/pipermail/python-ldap/ + + +Documentation +------------- + +The documentation for python-ldap 3.x is hosted at `Read the Docs`_. + +You can switch between versions of the library, or download PDF or HTML +versions for offline use, using the right sidebar. + +.. _Read the Docs: http://python-ldap.readthedocs.io/en/latest/ + + +Contents +-------- + +.. toctree:: + :maxdepth: 2 + + installing.rst + reference/index.rst + resources.rst + faq.rst + + +Bytes/text management +--------------------- + +The LDAP protocol states that some fields (distinguised names, relative distinguished names, +attribute names, queries) be encoded in UTF-8; some other (mostly attribute *values*) **MAY** +contain any type of data, and thus be treated as bytes. + +In Python 2, ``python-ldap`` used bytes for all fields, including those guaranteed to be text. +In order to support Python 3, this distinction is made explicit. This is done +through the ``bytes_mode`` flag to ``ldap.initialize()``. + +When porting from ``python-ldap`` 2.x, users are advised to update their code to set ``bytes_mode=False`` +on calls to these methods. +Under Python 2, ``python-pyldap`` aggressively checks the type of provided arguments, and will raise a ``TypeError`` +for any invalid parameter. +However, if the ``bytes_mode`` kwarg isn't provided, ``pyldap`` will only +raise warnings. + +The typical usage is as follows; note that only the result's *values* are of the bytes type: + +.. code-block:: pycon + + >>> import ldap + >>> con = ldap.initialize('ldap://localhost:389', bytes_mode=False) + >>> con.simple_bind_s('login', 'secret_password') + >>> results = con.search_s('ou=people,dc=example,dc=org', ldap.SCOPE_SUBTREE, "(cn=Raphaël)") + >>> results + [ + ("cn=Raphaël,ou=people,dc=example,dc=org", { + 'cn': [b'Rapha\xc3\xabl'], + 'sn': [b'Barrois'], + }), + ] + + +Indices and tables +------------------ + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/Doc/installing.rst b/Doc/installing.rst index bcc41be..cc0ee01 100644 --- a/Doc/installing.rst +++ b/Doc/installing.rst @@ -1,19 +1,106 @@ -*********************** -Building and installing -*********************** +.. _Download information: -python-ldap is built and installed using the Python DistUtils installed -along with your Python installation: +Installing python-ldap +###################### -:: +Installing from PyPI +==================== + +The preferred point for downloading the “official” source distribution +is now the `PyPI repository`_ which supports installing via `pip`_. +For example:: + + python -m pip install python-ldap + +.. _PyPI repository: https://pypi.python.org/pypi/python-ldap/ +.. _pip: https://pip.pypa.io/en/stable/ + +For installing from PyPI, you will need the :ref:`build prerequisites` +as when installing from source. + +We do not currently provide pre-built packages (wheels). + + +Furthermore, python-ldap requires the modules `pyasn1`_ and `pyasn1-modules`_. +``pip`` will install these automatically. + +.. _pyasn1: https://pypi.python.org/pypi/pyasn1 +.. _pyasn1-modules: https://pypi.python.org/pypi/pyasn1-modules + + +Pre-built Binaries +================== + +Because distributions seem to be all over the place, this page +tries to list all the current ones we know of. + +Note that the python-ldap team is not responsible for the binary packages +except the sources you can grab from the PyPI page. Also note that binary +packages are most times not up to date. If you experience troubles +with a binary package, it would be nice if you try to build a recent version +of python-ldap before submitting a bug report to make sure you did not +hit a problem already fixed in recent releases. + +`openSUSE Linux `_ +--------------------------------------------- + +ships with python-ldap and there's an additional +`download repository `_ +which contains builds of latest releases +(see also `OBS package `_ + +`Debian Linux `_ +---------------------------------------- + +Have a look into the +`Debian Package Tracker `_ +to get up to date information which versions are available. + + +Windows +------- - python setup.py build - python setup.py install +Unoficial packages for Windows are available on +`Christoph Gohlke's page `_. -If you have more than one Python interpreter installed locally you should + +`FreeBSD `_ + +Mac OS X +-------- + +You can install directly with pip:: + + xcode-select --install + pip install python-ldap \ + --global-option=build_ext \ + --global-option="-I$(xcrun --show-sdk-path)/usr/include/sasl" + + +Installing from Source +====================== + + +python-ldap is built and installed using the Python setuptools. +From a source repository:: + + python -m pip install setuptools + python setup.py install + +If you have more than one Python interpreter installed locally, you should use the same one you plan to use python-ldap with. -See further instructions for using DistUtils here: https://docs.python.org/2.7/install/index.html +See further instructions can be found in `Setuptools documentation`_. + + +.. _Setuptools documentation: https://docs.python.org/3/distributing/index.html + + +.. _build prerequisites: Build prerequisites =================== @@ -21,25 +108,18 @@ Build prerequisites The following software packages are required to be installed on the local system when building python-ldap: -- Python version 2.3 or later including its development files: https://www.python.org/ -- OpenLDAP client libs version 2.4.11 or later: https://www.openldap.org/ +- `Python`_ version 2.7, or 3.3 or later including its development files +- `OpenLDAP`_ client libs version 2.4.11 or later It is not possible and not supported to build with prior versions. -- OpenSSL (optional): https://www.openssl.org/ -- cyrus-sasl (optional): https://www.cyrusimap.org/sasl/ -- Kerberos libs, MIT or heimdal (optional) +- `OpenSSL`_ (optional) +- `cyrus-sasl`_ (optional) +- Kerberos libraries, MIT or heimdal (optional) -Installation prerequisites -========================== +.. _Python: https://www.python.org/ +.. _OpenLDAP: https://www.openldap.org/ +.. _OpenSSL: https://www.openssl.org/ +.. _cyrus-sasl: https://www.cyrusimap.org/sasl/ -Furthermore it is required that modules -:py:mod:`pyasn1` and :py:mod:`pyasn1_modules` -are installed. - - https://github.com/etingof/pyasn1 - - https://pypi.python.org/pypi/pyasn1 - - https://pypi.python.org/pypi/pyasn1-modules setup.cfg ========= @@ -70,33 +150,40 @@ documentation of Python's DistUtils. .. _libs-used-label: -Libs used ---------- -.. data:noindex: ldap -.. data:noindex: ldap_r +Libraries used +--------------- + +.. data:: ldap + :noindex: +.. data:: ldap_r + :noindex: The LDAP protocol library of OpenLDAP. ldap_r is the reentrant version and should be preferred. -.. data:noindex: lber +.. data:: lber + :noindex: The BER encoder/decoder library of OpenLDAP. -.. data:noindex: sasl2 +.. data:: sasl2 + :noindex: The Cyrus-SASL library if needed and present during build -.. data:noindex: ssl +.. data:: ssl + :noindex: The SSL/TLS library of OpenSSL if needed and present during build -.. data:noindex: crypto +.. data:: crypto + :noindex: The basic cryptographic library of OpenSSL if needed and present during build Example -============= +------- The following example is for a full-featured build (including SSL and SASL support) of python-ldap with OpenLDAP installed in a different prefix directory diff --git a/Doc/reference/index.rst b/Doc/reference/index.rst new file mode 100644 index 0000000..fa45b84 --- /dev/null +++ b/Doc/reference/index.rst @@ -0,0 +1,26 @@ +python-ldap Reference Documentation +=================================== + +This document describes the package python-ldap with its various modules. + +Depending on what you want to do this manual assumes basic to expert +knowledge about the Python language and the LDAP standard (LDAPv3). + + +.. toctree:: + :maxdepth: 3 + + ldap.rst + ldap-async.rst + ldap-controls.rst + ldap-dn.rst + ldap-extop.rst + ldap-filter.rst + ldap-modlist.rst + ldap-resiter.rst + ldap-schema.rst + ldap-syncrepl.rst + ldap-sasl.rst + ldif.rst + ldapurl.rst + slapdtest.rst diff --git a/Doc/ldap-async.rst b/Doc/reference/ldap-async.rst similarity index 100% rename from Doc/ldap-async.rst rename to Doc/reference/ldap-async.rst diff --git a/Doc/ldap-controls.rst b/Doc/reference/ldap-controls.rst similarity index 100% rename from Doc/ldap-controls.rst rename to Doc/reference/ldap-controls.rst diff --git a/Doc/ldap-dn.rst b/Doc/reference/ldap-dn.rst similarity index 100% rename from Doc/ldap-dn.rst rename to Doc/reference/ldap-dn.rst diff --git a/Doc/ldap-extop.rst b/Doc/reference/ldap-extop.rst similarity index 100% rename from Doc/ldap-extop.rst rename to Doc/reference/ldap-extop.rst diff --git a/Doc/ldap-filter.rst b/Doc/reference/ldap-filter.rst similarity index 100% rename from Doc/ldap-filter.rst rename to Doc/reference/ldap-filter.rst diff --git a/Doc/ldap-modlist.rst b/Doc/reference/ldap-modlist.rst similarity index 100% rename from Doc/ldap-modlist.rst rename to Doc/reference/ldap-modlist.rst diff --git a/Doc/ldap-resiter.rst b/Doc/reference/ldap-resiter.rst similarity index 99% rename from Doc/ldap-resiter.rst rename to Doc/reference/ldap-resiter.rst index 0e72e92..66ce6ca 100644 --- a/Doc/ldap-resiter.rst +++ b/Doc/reference/ldap-resiter.rst @@ -20,7 +20,7 @@ derived classes which has these methods: Examples -======== +-------- .. _ldap.resiter.ResultProcessor-example: diff --git a/Doc/ldap-sasl.rst b/Doc/reference/ldap-sasl.rst similarity index 100% rename from Doc/ldap-sasl.rst rename to Doc/reference/ldap-sasl.rst diff --git a/Doc/ldap-schema.rst b/Doc/reference/ldap-schema.rst similarity index 100% rename from Doc/ldap-schema.rst rename to Doc/reference/ldap-schema.rst diff --git a/Doc/ldap-syncrepl.rst b/Doc/reference/ldap-syncrepl.rst similarity index 100% rename from Doc/ldap-syncrepl.rst rename to Doc/reference/ldap-syncrepl.rst diff --git a/Doc/ldap.rst b/Doc/reference/ldap.rst similarity index 99% rename from Doc/ldap.rst rename to Doc/reference/ldap.rst index d526370..c80e386 100644 --- a/Doc/ldap.rst +++ b/Doc/reference/ldap.rst @@ -614,6 +614,8 @@ with names ending in :py:const:`_ext` or :py:const:`_ext_s`: request. +.. _sending-ldap-requests: + Sending LDAP requests --------------------- diff --git a/Doc/ldapurl.rst b/Doc/reference/ldapurl.rst similarity index 100% rename from Doc/ldapurl.rst rename to Doc/reference/ldapurl.rst diff --git a/Doc/ldif.rst b/Doc/reference/ldif.rst similarity index 100% rename from Doc/ldif.rst rename to Doc/reference/ldif.rst diff --git a/Doc/slapdtest.rst b/Doc/reference/slapdtest.rst similarity index 100% rename from Doc/slapdtest.rst rename to Doc/reference/slapdtest.rst diff --git a/Doc/resources.rst b/Doc/resources.rst new file mode 100644 index 0000000..56cb1a1 --- /dev/null +++ b/Doc/resources.rst @@ -0,0 +1,55 @@ +Third-party documentation +========================= + +The following documents referenced are not written by python-ldap project +members. Therefore some information might be outdated or links might be broken. + + +*Python LDAP Applications* articles by Matt Butcher +--------------------------------------------------- + +* `Part 1 - Installing and Configuring the Python-LDAP Library and Binding to an LDAP Directory `_ + + This also covers SASL. + +* `Part 2 - LDAP Operations `_ +* `Part 3 - More LDAP Operations and the LDAP URL Library `_ +* `Part 4 - LDAP Schema `_ + + Gee, someone waded through the badly documented mysteries of module + :mod:`ldap.schema`. + + +`LDAP Programming in Python `_ +------------------------------------------------------------------------- + +Another article for getting started with python-ldap. + + + +`RFC 1823 `_ +------------------------------------------------- + +The LDAP Application Program Interface, mainly for LDAPv2. + + + +`LDAPEXT draft `_ +---------------------------------------------------------------------------- + +The Internet draft of the discontinued IETF working group LDAPEXT is of +interest here since the OpenLDAP 2 libs implement this (expired) draft. + + +`OpenLDAP `_ +--------------------------------------- + +It's worth to have a look at the +`manual pages `_ and the +`Developer's FAQ `_. + + +`VSLDAP `_ +---------------------------------------------------------------------------------------- + +VSLDAP Interoperability Test Suite. diff --git a/Lib/ldap/sasl.py b/Lib/ldap/sasl.py index fa6f4f5..b54bf2a 100644 --- a/Lib/ldap/sasl.py +++ b/Lib/ldap/sasl.py @@ -54,7 +54,7 @@ def callback(self, cb_id, challenge, prompt, defresult): """ The callback method will be called by the sasl_bind_s() method several times. Each time it will provide the id, which - tells us what kind of information is requested (the CB_ ... + tells us what kind of information is requested (the CB_* constants above). The challenge might be a short (english) text or some binary string, from which the return value is calculated. The prompt argument is always a human-readable description string;