Skip to content

getting or setting ldap.OPT_X_SASL_* options raises "ValueError: option error" #468

@jayhendren

Description

@jayhendren

Issue description:

A ValueError is raised whenever using get_option or set_option with any OPT_X_SASL_ options (other, non-SASL options seem to work fine).

Steps to reproduce:

┌─[jay@eagle] - [~/Work/git/systems] - [2022-04-12 03:58:58]
└─[0] <git:(master cb7fb8cae✈) > python
Python 3.8.2 (default, Dec 15 2021, 14:32:00) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ldap
>>> ldap.get_option(ldap.OPT_X_SASL_SECPROPS)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jay/.pyenv/versions/3.8.2/lib/python3.8/site-packages/ldap/functions.py", line 103, in get_option
    return _ldap_function_call(None,_ldap.get_option,option)
  File "/home/jay/.pyenv/versions/3.8.2/lib/python3.8/site-packages/ldap/functions.py", line 52, in _ldap_function_call
    result = func(*args,**kwargs)
ValueError: option error

Operating system: Pop!_OS 20.04 LTS

Python version: 3.8.2 (installed via pyenv)

python-ldap version: 3.4.0

FWIW, I also have the following packages installed:

┌─[jay@eagle] - [~/Work/git/systems] - [2022-04-12 04:14:03]
└─[0] <git:(master cb7fb8cae✈) > dpkg -l | grep -iE 'sasl|ldap'
ii  ldap-utils                                       2.4.49+dfsg-2ubuntu1.8                                 amd64        OpenLDAP utilities
ii  libauthen-sasl-perl                              2.1600-1                                               all          Authen::SASL - SASL Authentication framework
ii  libldap-2.4-2:amd64                              2.4.49+dfsg-2ubuntu1.8                                 amd64        OpenLDAP libraries
ii  libldap-common                                   2.4.49+dfsg-2ubuntu1.8                                 all          OpenLDAP common files for libraries
ii  libldap2-dev:amd64                               2.4.49+dfsg-2ubuntu1.8                                 amd64        OpenLDAP development libraries
ii  libldb2:amd64                                    2:2.2.3-0ubuntu0.20.04.2                               amd64        LDAP-like embedded database - shared library
ii  libsasl2-2:amd64                                 2.1.27+dfsg-2ubuntu0.1                                 amd64        Cyrus SASL - authentication abstraction library
ii  libsasl2-dev                                     2.1.27+dfsg-2ubuntu0.1                                 amd64        Cyrus SASL - development files for authentication abstraction library
ii  libsasl2-modules:amd64                           2.1.27+dfsg-2ubuntu0.1                                 amd64        Cyrus SASL - pluggable authentication modules
ii  libsasl2-modules-db:amd64                        2.1.27+dfsg-2ubuntu0.1                                 amd64        Cyrus SASL - pluggable authentication modules (DB)
ii  libsasl2-modules-gssapi-mit:amd64                2.1.27+dfsg-2ubuntu0.1                                 amd64        Cyrus SASL - pluggable authentication modules (GSSAPI)
ii  libsasl2-modules-ldap:amd64                      2.1.27+dfsg-2ubuntu0.1                                 amd64        Cyrus SASL - pluggable authentication modules (LDAP)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy