1 .TH LDAP_ERROR 3 "RELEASEDATE" "OpenLDAP LDVERSION"
3 .\" Copyright 1998-2006 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
6 ldap_perror, ld_errno, ldap_result2error, ldap_errlist, ldap_err2string \- LDAP protocol error handling routines
8 OpenLDAP LDAP (libldap, -lldap)
15 char *ldap_err2string( int err );
18 void ldap_perror( LDAP *ld, const char *s )
21 int ldap_result2error( LDAP *ld, LDAPMessage *res, int freeit )
23 These routines provide interpretation of the various error codes
24 returned by the LDAP protocol and LDAP library routines or associated
25 with an LDAP session. The error code associated with an LDAP session
27 .BR ldap_get_option (3)
29 .BR ldap_set_option (3)
31 .B LDAP_OPT_RESULT_CODE
32 option (previously called
33 .BR LDAP_OPT_ERROR_NUMBER ).
36 .B ldap_result2error()
37 routine takes \fIres\fP, a result as produced by
40 .BR ldap_search_s (3),
42 the corresponding error code. Possible error codes are listed
43 below. If the \fIfreeit\fP parameter is non zero it indicates that the
44 \fIres\fP parameter should be freed by a call to
46 after the error code has been extracted. The
48 field in \fIld\fP is set and returned.
50 The returned value can be passed to
52 to get a text description of the message. The string
55 is a pointer to a static area that
56 should not be modified.
60 routine can be called to print an indication of
61 the error on standard error, similar to the way
65 The possible values for an ldap error code are:
69 The request was successful.
71 .SM LDAP_OPERATIONS_ERROR
72 An operations error occurred.
74 .SM LDAP_PROTOCOL_ERROR
75 A protocol violation was detected.
77 .SM LDAP_TIMELIMIT_EXCEEDED
78 An LDAP time limit was exceeded.
80 .SM LDAP_SIZELIMIT_EXCEEDED
81 An LDAP size limit was exceeded.
83 .SM LDAP_COMPARE_FALSE
84 A compare operation returned false.
87 A compare operation returned true.
89 .SM LDAP_STRONG_AUTH_NOT_SUPPORTED
90 The LDAP server does not support strong authentication.
92 .SM LDAP_STRONG_AUTH_REQUIRED
93 Strong authentication is required for the operation.
95 .SM LDAP_PARTIAL_RESULTS
96 Partial results only returned.
98 .SM LDAP_NO_SUCH_ATTRIBUTE
99 The attribute type specified does not exist in the entry.
101 .SM LDAP_UNDEFINED_TYPE
102 The attribute type specified is invalid.
104 .SM LDAP_INAPPROPRIATE_MATCHING
105 Filter type not supported for the specified attribute.
107 .SM LDAP_CONSTRAINT_VIOLATION
108 An attribute value specified violates some constraint (e.g., a postalAddress
109 has too many lines, or a line that is too long).
111 .SM LDAP_TYPE_OR_VALUE_EXISTS
112 An attribute type or attribute value specified already exists in the entry.
114 .SM LDAP_INVALID_SYNTAX
115 An invalid attribute value was specified.
117 .SM LDAP_NO_SUCH_OBJECT
118 The specified object does not exist in The Directory.
120 .SM LDAP_ALIAS_PROBLEM
121 An alias in The Directory points to a nonexistent entry.
123 .SM LDAP_INVALID_DN_SYNTAX
124 A syntactically invalid DN was specified.
127 The object specified is a leaf.
129 .SM LDAP_ALIAS_DEREF_PROBLEM
130 A problem was encountered when dereferencing an alias.
132 .SM LDAP_INAPPROPRIATE_AUTH
133 Inappropriate authentication was specified (e.g., LDAP_AUTH_SIMPLE was
134 specified and the entry does not have a userPassword attribute).
136 .SM LDAP_INVALID_CREDENTIALS
137 Invalid credentials were presented (e.g., the wrong password).
139 .SM LDAP_INSUFFICIENT_ACCESS
140 The user has insufficient access to perform the operation.
146 The DSA is unavailable.
148 .SM LDAP_UNWILLING_TO_PERFORM
149 The DSA is unwilling to perform the operation.
154 .SM LDAP_NAMING_VIOLATION
155 A naming violation occurred.
157 .SM LDAP_OBJECT_CLASS_VIOLATION
158 An object class violation occurred (e.g., a "must" attribute was missing
161 .SM LDAP_NOT_ALLOWED_ON_NONLEAF
162 The operation is not allowed on a nonleaf object.
164 .SM LDAP_NOT_ALLOWED_ON_RDN
165 The operation is not allowed on an RDN.
167 .SM LDAP_ALREADY_EXISTS
168 The entry already exists.
170 .SM LDAP_NO_OBJECT_CLASS_MODS
171 Object class modifications are not allowed.
174 An unknown error occurred.
177 The LDAP library can't contact the LDAP server.
180 Some local error occurred. This is usually a failed dynamic memory allocation.
182 .SM LDAP_ENCODING_ERROR
183 An error was encountered encoding parameters to send to the LDAP server.
185 .SM LDAP_DECODING_ERROR
186 An error was encountered decoding a result from the LDAP server.
189 A timelimit was exceeded while waiting for a result.
191 .SM LDAP_AUTH_UNKNOWN
192 The authentication method specified to ldap_bind() is not known.
194 .SM LDAP_FILTER_ERROR
195 An invalid filter was supplied to ldap_search() (e.g., unbalanced
199 An ldap routine was called with a bad parameter.
202 An memory allocation (e.g., malloc(3) or other dynamic memory
203 allocator) call failed in an ldap
210 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
212 is derived from University of Michigan LDAP 3.3 Release.