1.lf 1 stdin
2.TH LDAP_ERROR 3 "2020/04/28" "OpenLDAP 2.4.50"
3.\" $OpenLDAP$
4.\" Copyright 1998-2020 The OpenLDAP Foundation All Rights Reserved.
5.\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
6.SH NAME
7ldap_perror, ld_errno, ldap_result2error, ldap_errlist, ldap_err2string \- LDAP protocol error handling routines
8.SH LIBRARY
9OpenLDAP LDAP (libldap, \-lldap)
10.SH SYNOPSIS
11.nf
12.ft B
13#include <ldap.h>
14.LP
15.ft B
16char *ldap_err2string( int \fIerr\fB );
17.SH DESCRIPTION
18The
19.B ldap_err2string()
20routine provides short description of the various codes returned by
21routines in this library.  The returned string is a pointer to a
22static area that should not be modified.
23
24These codes are either negative,
25indicating an API error code; positive, indicating an LDAP resultCode
26other than \'success' (0), or - zero, indicating both successful use
27of the API and the LDAP resultCode \'success' (0).
28
29The code associated with an LDAP session is accessible using
30.BR ldap_get_option (3)
31and
32.BR ldap_set_option (3)
33with the
34.B LDAP_OPT_RESULT_CODE
35option (previously called
36.BR LDAP_OPT_ERROR_NUMBER ).
37
38.SH PROTOCOL RESULT CODES
39
40This section provides a partial list of protocol codes recognized
41by the library.  As LDAP is extensible, additional values may be
42returned.  A complete listing of \fIregistered\fP LDAP result codes
43can be obtained from the \fIInternet Assigned Numbers Authority\fP
44<http://www.iana.org>.
45
46.LP
47.TP 20
48.SM LDAP_SUCCESS
49The request was successful.
50.TP
51.SM LDAP_OPERATIONS_ERROR
52An operations error occurred.
53.TP
54.SM LDAP_PROTOCOL_ERROR
55A protocol violation was detected.
56.TP
57.SM LDAP_TIMELIMIT_EXCEEDED
58An LDAP time limit was exceeded.
59.TP
60.SM LDAP_SIZELIMIT_EXCEEDED
61An LDAP size limit was exceeded.
62.TP
63.SM LDAP_COMPARE_FALSE
64A compare operation returned false.
65.TP
66.SM LDAP_COMPARE_TRUE
67A compare operation returned true.
68.TP
69.SM LDAP_STRONG_AUTH_NOT_SUPPORTED
70The LDAP server does not support strong authentication.
71.TP
72.SM LDAP_STRONG_AUTH_REQUIRED
73Strong authentication is required for the operation.
74.TP
75.SM LDAP_PARTIAL_RESULTS
76Partial results only returned.
77.TP
78.SM LDAP_NO_SUCH_ATTRIBUTE
79The attribute type specified does not exist in the entry.
80.TP
81.SM LDAP_UNDEFINED_TYPE
82The attribute type specified is invalid.
83.TP
84.SM LDAP_INAPPROPRIATE_MATCHING
85Filter type not supported for the specified attribute.
86.TP
87.SM LDAP_CONSTRAINT_VIOLATION
88An attribute value specified violates some constraint (e.g., a postalAddress
89has too many lines, or a line that is too long).
90.TP
91.SM LDAP_TYPE_OR_VALUE_EXISTS
92An attribute type or attribute value specified already exists in the entry.
93.TP
94.SM LDAP_INVALID_SYNTAX
95An invalid attribute value was specified.
96.TP
97.SM LDAP_NO_SUCH_OBJECT
98The specified object does not exist in The Directory.
99.TP
100.SM LDAP_ALIAS_PROBLEM
101An alias in The Directory points to a nonexistent entry.
102.TP
103.SM LDAP_INVALID_DN_SYNTAX
104A syntactically invalid DN was specified.
105.TP
106.SM LDAP_IS_LEAF
107The object specified is a leaf.
108.TP
109.SM LDAP_ALIAS_DEREF_PROBLEM
110A problem was encountered when dereferencing an alias.
111.TP
112.SM LDAP_INAPPROPRIATE_AUTH
113Inappropriate authentication was specified (e.g., LDAP_AUTH_SIMPLE was
114specified and the entry does not have a userPassword attribute).
115.TP
116.SM LDAP_INVALID_CREDENTIALS
117Invalid credentials were presented (e.g., the wrong password).
118.TP
119.SM LDAP_INSUFFICIENT_ACCESS
120The user has insufficient access to perform the operation.
121.TP
122.SM LDAP_BUSY
123The DSA is busy.
124.TP
125.SM LDAP_UNAVAILABLE
126The DSA is unavailable.
127.TP
128.SM LDAP_UNWILLING_TO_PERFORM
129The DSA is unwilling to perform the operation.
130.TP
131.SM LDAP_LOOP_DETECT
132A loop was detected.
133.TP
134.SM LDAP_NAMING_VIOLATION
135A naming violation occurred.
136.TP
137.SM LDAP_OBJECT_CLASS_VIOLATION
138An object class violation occurred (e.g., a "must" attribute was missing
139from the entry).
140.TP
141.SM LDAP_NOT_ALLOWED_ON_NONLEAF
142The operation is not allowed on a nonleaf object.
143.TP
144.SM LDAP_NOT_ALLOWED_ON_RDN
145The operation is not allowed on an RDN.
146.TP
147.SM LDAP_ALREADY_EXISTS
148The entry already exists.
149.TP
150.SM LDAP_NO_OBJECT_CLASS_MODS
151Object class modifications are not allowed.
152.TP
153.SM LDAP_OTHER
154An unknown error occurred.
155
156.SH API ERROR CODES
157
158This section provides a complete list of API error codes recognized
159by the library.   Note that LDAP_SUCCESS indicates success of an
160API call in addition to representing the return of the LDAP
161\'success' resultCode.
162
163
164.LP
165.TP 20
166.SM LDAP_SERVER_DOWN
167The LDAP library can't contact the LDAP server.
168.TP
169.SM LDAP_LOCAL_ERROR
170Some local error occurred.  This is usually a failed dynamic memory allocation.
171.TP
172.SM LDAP_ENCODING_ERROR
173An error was encountered encoding parameters to send to the LDAP server.
174.TP
175.SM LDAP_DECODING_ERROR
176An error was encountered decoding a result from the LDAP server.
177.TP
178.SM LDAP_TIMEOUT
179A timelimit was exceeded while waiting for a result.
180.TP
181.SM LDAP_AUTH_UNKNOWN
182The authentication method specified to ldap_bind() is not known.
183.TP
184.SM LDAP_FILTER_ERROR
185An invalid filter was supplied to ldap_search() (e.g., unbalanced
186parentheses).
187.TP
188.SM LDAP_PARAM_ERROR
189An ldap routine was called with a bad parameter.
190.TP
191.SM LDAP_NO_MEMORY
192An memory allocation (e.g., malloc(3) or other dynamic memory
193allocator) call failed in an ldap library routine.
194.TP
195.SM LDAP_USER_CANCELED
196Indicates the user cancelled the operation.
197.TP
198.SM LDAP_CONNECT_ERROR
199Indicates a connection problem.
200.TP
201.SM LDAP_NOT_SUPPORTED
202Indicates the routine was called in a manner not supported by the library.
203.TP
204.SM LDAP_CONTROL_NOT_FOUND
205Indicates the control provided is unknown to the client library.
206.TP
207.SM LDAP_NO_RESULTS_RETURNED
208Indicates no results returned.
209.TP
210.SM LDAP_MORE_RESULTS_TO_RETURN
211Indicates more results could be returned.
212.TP
213.SM LDAP_CLIENT_LOOP
214Indicates the library has detected a loop in its processing.
215.TP
216.SM LDAP_REFERRAL_LIMIT_EXCEEDED
217Indicates the referral limit has been exceeded.
218
219.SH DEPRECATED
220.lf 1 ./Deprecated
221Deprecated interfaces generally remain in the library.  The macro
222LDAP_DEPRECATED can be defined to a non-zero value
223(e.g., -DLDAP_DEPRECATED=1) when compiling program designed to use
224deprecated interfaces.  It is recommended that developers writing new
225programs, or updating old programs, avoid use of deprecated interfaces.
226Over time, it is expected that documentation (and, eventually, support) for
227deprecated interfaces to be eliminated.
228.lf 220 stdin
229
230.SH SEE ALSO
231.BR ldap (3),
232.SH ACKNOWLEDGEMENTS
233.lf 1 ./../Project
234.\" Shared Project Acknowledgement Text
235.B "OpenLDAP Software"
236is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>.
237.B "OpenLDAP Software"
238is derived from the University of Michigan LDAP 3.3 Release.  
239.lf 225 stdin
240