1LDAP_ERROR(3)              Library Functions Manual              LDAP_ERROR(3)
2
3
4

NAME

6       ldap_perror, ld_errno, ldap_result2error, ldap_errlist, ldap_err2string
7       - LDAP protocol error handling routines
8

LIBRARY

10       OpenLDAP LDAP (libldap, -lldap)
11

SYNOPSIS

13       #include <ldap.h>
14
15       char *ldap_err2string( int err );
16

DESCRIPTION

18       The ldap_err2string() routine provides short description of the various
19       codes  returned  by routines in this library.  The returned string is a
20       pointer to a static area that should not be modified.
21
22       These codes are either negative, indicating an API  error  code;  posi‐
23       tive,  indicating  an  LDAP  resultCode  other than ´success' (0), or -
24       zero, indicating both successful use of the API and the LDAP resultCode
25       ´success' (0).
26
27       The   code   associated  with  an  LDAP  session  is  accessible  using
28       ldap_get_option(3) and ldap_set_option(3) with the LDAP_OPT_RESULT_CODE
29       option (previously called LDAP_OPT_ERROR_NUMBER).
30
31

PROTOCOL RESULT CODES

33       This  section  provides  a partial list of protocol codes recognized by
34       the library.  As LDAP is extensible, additional values may be returned.
35       A complete listing of registered LDAP result codes can be obtained from
36       the Internet Assigned Numbers Authority <http://www.iana.org>.
37
38
39       LDAP_SUCCESS        The request was successful.
40
41       LDAP_OPERATIONS_ERROR
42                           An operations error occurred.
43
44       LDAP_PROTOCOL_ERROR A protocol violation was detected.
45
46       LDAP_TIMELIMIT_EXCEEDED
47                           An LDAP time limit was exceeded.
48
49       LDAP_SIZELIMIT_EXCEEDED
50                           An LDAP size limit was exceeded.
51
52       LDAP_COMPARE_FALSE  A compare operation returned false.
53
54       LDAP_COMPARE_TRUE   A compare operation returned true.
55
56       LDAP_STRONG_AUTH_NOT_SUPPORTED
57                           The LDAP server does not support strong authentica‐
58                           tion.
59
60       LDAP_STRONG_AUTH_REQUIRED
61                           Strong  authentication  is  required for the opera‐
62                           tion.
63
64       LDAP_PARTIAL_RESULTS
65                           Partial results only returned.
66
67       LDAP_NO_SUCH_ATTRIBUTE
68                           The attribute type specified does not exist in  the
69                           entry.
70
71       LDAP_UNDEFINED_TYPE The attribute type specified is invalid.
72
73       LDAP_INAPPROPRIATE_MATCHING
74                           Filter  type not supported for the specified attri‐
75                           bute.
76
77       LDAP_CONSTRAINT_VIOLATION
78                           An attribute value  specified  violates  some  con‐
79                           straint  (e.g., a postalAddress has too many lines,
80                           or a line that is too long).
81
82       LDAP_TYPE_OR_VALUE_EXISTS
83                           An attribute type or attribute value specified  al‐
84                           ready exists in the entry.
85
86       LDAP_INVALID_SYNTAX An invalid attribute value was specified.
87
88       LDAP_NO_SUCH_OBJECT The  specified  object does not exist in The Direc‐
89                           tory.
90
91       LDAP_ALIAS_PROBLEM  An alias in The Directory points to  a  nonexistent
92                           entry.
93
94       LDAP_INVALID_DN_SYNTAX
95                           A syntactically invalid DN was specified.
96
97       LDAP_IS_LEAF        The object specified is a leaf.
98
99       LDAP_ALIAS_DEREF_PROBLEM
100                           A  problem  was  encountered  when dereferencing an
101                           alias.
102
103       LDAP_INAPPROPRIATE_AUTH
104                           Inappropriate authentication was  specified  (e.g.,
105                           LDAP_AUTH_SIMPLE  was  specified and the entry does
106                           not have a userPassword attribute).
107
108       LDAP_INVALID_CREDENTIALS
109                           Invalid credentials were presented (e.g., the wrong
110                           password).
111
112       LDAP_INSUFFICIENT_ACCESS
113                           The user has insufficient access to perform the op‐
114                           eration.
115
116       LDAP_BUSY           The DSA is busy.
117
118       LDAP_UNAVAILABLE    The DSA is unavailable.
119
120       LDAP_UNWILLING_TO_PERFORM
121                           The DSA is unwilling to perform the operation.
122
123       LDAP_LOOP_DETECT    A loop was detected.
124
125       LDAP_NAMING_VIOLATION
126                           A naming violation occurred.
127
128       LDAP_OBJECT_CLASS_VIOLATION
129                           An object class violation occurred (e.g., a  "must"
130                           attribute was missing from the entry).
131
132       LDAP_NOT_ALLOWED_ON_NONLEAF
133                           The operation is not allowed on a nonleaf object.
134
135       LDAP_NOT_ALLOWED_ON_RDN
136                           The operation is not allowed on an RDN.
137
138       LDAP_ALREADY_EXISTS The entry already exists.
139
140       LDAP_NO_OBJECT_CLASS_MODS
141                           Object class modifications are not allowed.
142
143       LDAP_OTHER          An unknown error occurred.
144
145

API ERROR CODES

147       This  section provides a complete list of API error codes recognized by
148       the library.   Note that LDAP_SUCCESS indicates success of an API  call
149       in  addition  to  representing the return of the LDAP ´success' result‐
150       Code.
151
152
153
154       LDAP_SERVER_DOWN    The LDAP library can't contact the LDAP server.
155
156       LDAP_LOCAL_ERROR    Some local  error  occurred.   This  is  usually  a
157                           failed dynamic memory allocation.
158
159       LDAP_ENCODING_ERROR An  error  was  encountered  encoding parameters to
160                           send to the LDAP server.
161
162       LDAP_DECODING_ERROR An error was encountered decoding a result from the
163                           LDAP server.
164
165       LDAP_TIMEOUT        A  timelimit  was  exceeded while waiting for a re‐
166                           sult.
167
168       LDAP_AUTH_UNKNOWN   The authentication method specified to  ldap_bind()
169                           is not known.
170
171       LDAP_FILTER_ERROR   An  invalid  filter  was  supplied to ldap_search()
172                           (e.g., unbalanced parentheses).
173
174       LDAP_PARAM_ERROR    An ldap routine was called with a bad parameter.
175
176       LDAP_NO_MEMORY      An memory allocation (e.g., malloc(3) or other  dy‐
177                           namic  memory allocator) call failed in an ldap li‐
178                           brary routine.
179
180       LDAP_USER_CANCELED  Indicates the user cancelled the operation.
181
182       LDAP_CONNECT_ERROR  Indicates a connection problem.
183
184       LDAP_NOT_SUPPORTED  Indicates the routine was called in  a  manner  not
185                           supported by the library.
186
187       LDAP_CONTROL_NOT_FOUND
188                           Indicates  the  control  provided is unknown to the
189                           client library.
190
191       LDAP_NO_RESULTS_RETURNED
192                           Indicates no results returned.
193
194       LDAP_MORE_RESULTS_TO_RETURN
195                           Indicates more results could be returned.
196
197       LDAP_CLIENT_LOOP    Indicates the library has detected a  loop  in  its
198                           processing.
199
200       LDAP_REFERRAL_LIMIT_EXCEEDED
201                           Indicates the referral limit has been exceeded.
202
203

DEPRECATED

205       Deprecated  interfaces  generally  remain  in  the  library.  The macro
206       LDAP_DEPRECATED can be defined to a non-zero value (e.g., -DLDAP_DEPRE‐
207       CATED=1)  when compiling program designed to use deprecated interfaces.
208       It is recommended that developers writing new programs, or updating old
209       programs,  avoid  use  of  deprecated interfaces.  Over time, it is ex‐
210       pected that documentation (and, eventually, support) for deprecated in‐
211       terfaces to be eliminated.
212
213

SEE ALSO

215       ldap(3),
216

ACKNOWLEDGEMENTS

218       OpenLDAP  Software  is developed and maintained by The OpenLDAP Project
219       <http://www.openldap.org/>.  OpenLDAP Software is derived from the Uni‐
220       versity of Michigan LDAP 3.3 Release.
221
222
223
224OpenLDAP 2.6.6                    2023/07/31                     LDAP_ERROR(3)
Impressum