The ldap_err2string() routine provides short description of the
various codes returned by routines in this library. The returned
string is a pointer to a static area that should not be modified.
These codes are either negative, indicating an API error code;
positive, indicating an LDAP resultCode other than ´success' (0), or
- zero, indicating both successful use of the API and the LDAP
resultCode ´success' (0).
The code associated with an LDAP session is accessible using
ldap_get_option(3) and ldap_set_option(3) with the
LDAP_OPT_RESULT_CODE option (previously called
This section provides a partial list of protocol codes recognized by
the library. As LDAP is extensible, additional values may be
returned. A complete listing of registered LDAP result codes can be
obtained from the Internet Assigned Numbers Authority
LDAP_SUCCESS The request was successful.
An operations error occurred.
LDAP_PROTOCOL_ERROR A protocol violation was detected.
An LDAP time limit was exceeded.
An LDAP size limit was exceeded.
LDAP_COMPARE_FALSE A compare operation returned false.
LDAP_COMPARE_TRUE A compare operation returned true.
The LDAP server does not support strong
Strong authentication is required for the
Partial results only returned.
The attribute type specified does not exist in
LDAP_UNDEFINED_TYPE The attribute type specified is invalid.
Filter type not supported for the specified
An attribute value specified violates some
constraint (e.g., a postalAddress has too many
lines, or a line that is too long).
An attribute type or attribute value specified
already exists in the entry.
LDAP_INVALID_SYNTAX An invalid attribute value was specified.
LDAP_NO_SUCH_OBJECT The specified object does not exist in The
LDAP_ALIAS_PROBLEM An alias in The Directory points to a nonexistent
A syntactically invalid DN was specified.
LDAP_IS_LEAF The object specified is a leaf.
A problem was encountered when dereferencing an
Inappropriate authentication was specified (e.g.,
LDAP_AUTH_SIMPLE was specified and the entry does
not have a userPassword attribute).
Invalid credentials were presented (e.g., the
The user has insufficient access to perform the
LDAP_BUSY The DSA is busy.
LDAP_UNAVAILABLE The DSA is unavailable.
The DSA is unwilling to perform the operation.
LDAP_LOOP_DETECT A loop was detected.
A naming violation occurred.
An object class violation occurred (e.g., a
"must" attribute was missing from the entry).
The operation is not allowed on a nonleaf object.
The operation is not allowed on an RDN.
LDAP_ALREADY_EXISTS The entry already exists.
Object class modifications are not allowed.
LDAP_OTHER An unknown error occurred.
This section provides a complete list of API error codes recognized
by the library. Note that LDAP_SUCCESS indicates success of an API
call in addition to representing the return of the LDAP ´success'
LDAP_SERVER_DOWN The LDAP library can't contact the LDAP server.
LDAP_LOCAL_ERROR Some local error occurred. This is usually a
failed dynamic memory allocation.
LDAP_ENCODING_ERROR An error was encountered encoding parameters to
send to the LDAP server.
LDAP_DECODING_ERROR An error was encountered decoding a result from
the LDAP server.
LDAP_TIMEOUT A timelimit was exceeded while waiting for a
LDAP_AUTH_UNKNOWN The authentication method specified to
ldap_bind() is not known.
LDAP_FILTER_ERROR An invalid filter was supplied to ldap_search()
(e.g., unbalanced parentheses).
LDAP_PARAM_ERROR An ldap routine was called with a bad parameter.
LDAP_NO_MEMORY An memory allocation (e.g., malloc(3) or other
dynamic memory allocator) call failed in an ldap
LDAP_USER_CANCELED Indicates the user cancelled the operation.
LDAP_CONNECT_ERROR Indicates a connection problem.
LDAP_NOT_SUPPORTED Indicates the routine was called in a manner not
supported by the library.
Indicates the control provided is unknown to the
Indicates no results returned.
Indicates more results could be returned.
LDAP_CLIENT_LOOP Indicates the library has detected a loop in its
Indicates the referral limit has been exceeded.
Deprecated interfaces generally remain in the library. The macro
LDAP_DEPRECATED can be defined to a non-zero value (e.g.,
-DLDAP_DEPRECATED=1) when compiling program designed to use
deprecated interfaces. It is recommended that developers writing new
programs, or updating old programs, avoid use of deprecated
interfaces. Over time, it is expected that documentation (and,
eventually, support) for deprecated interfaces to be eliminated.
This page is part of the OpenLDAP (an open source implementation of
the Lightweight Directory Access Protocol) project. Information
about the project can be found at ⟨http://www.openldap.org/⟩. If you
have a bug report for this manual page, see
⟨http://www.openldap.org/its/⟩. This page was obtained from the
project's upstream Git repository
⟨git://git.openldap.org/openldap.git⟩ on 2020-07-14. (At that time,
the date of the most recent commit that was found in the repository
was 2020-02-07.) If you discover any rendering problems in this HTML
version of the page, or you believe there is a better or more up-to-
date source for the page, or you have corrections or improvements to
the information in this COLOPHON (which is not part of the original
manual page), send a mail to firstname.lastname@example.org
OpenLDAP LDVERSION RELEASEDATE LDAP_ERROR(3)