1 .TH LDAP_ERROR 3 "RELEASEDATE" "OpenLDAP LDVERSION"
3 .\" Copyright 1998-2003 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_ERROR_NUMBER
35 .B ldap_result2error()
36 routine takes \fIres\fP, a result as produced by
39 .BR ldap_search_s (3),
41 the corresponding error code. Possible error codes are listed
42 below. If the \fIfreeit\fP parameter is non zero it indicates that the
43 \fIres\fP parameter should be freed by a call to
45 after the error code has been extracted. The
47 field in \fIld\fP is set and returned.
49 The returned value can be passed to
51 to get a text description of the message. The string
54 is a pointer to a static area that
55 should not be modified.
59 routine can be called to print an indication of
60 the error on standard error, similar to the way
64 The possible values for an ldap error code are:
68 The request was successful.
70 .SM LDAP_OPERATIONS_ERROR
71 An operations error occurred.
73 .SM LDAP_PROTOCOL_ERROR
74 A protocol violation was detected.
76 .SM LDAP_TIMELIMIT_EXCEEDED
77 An LDAP time limit was exceeded.
79 .SM LDAP_SIZELIMIT_EXCEEDED
80 An LDAP size limit was exceeded.
82 .SM LDAP_COMPARE_FALSE
83 A compare operation returned false.
86 A compare operation returned true.
88 .SM LDAP_STRONG_AUTH_NOT_SUPPORTED
89 The LDAP server does not support strong authentication.
91 .SM LDAP_STRONG_AUTH_REQUIRED
92 Strong authentication is required for the operation.
94 .SM LDAP_PARTIAL_RESULTS
95 Partial results only returned.
97 .SM LDAP_NO_SUCH_ATTRIBUTE
98 The attribute type specified does not exist in the entry.
100 .SM LDAP_UNDEFINED_TYPE
101 The attribute type specified is invalid.
103 .SM LDAP_INAPPROPRIATE_MATCHING
104 Filter type not supported for the specified attribute.
106 .SM LDAP_CONSTRAINT_VIOLATION
107 An attribute value specified violates some constraint (e.g., a postalAddress
108 has too many lines, or a line that is too long).
110 .SM LDAP_TYPE_OR_VALUE_EXISTS
111 An attribute type or attribute value specified already exists in the entry.
113 .SM LDAP_INVALID_SYNTAX
114 An invalid attribute value was specified.
116 .SM LDAP_NO_SUCH_OBJECT
117 The specified object does not exist in The Directory.
119 .SM LDAP_ALIAS_PROBLEM
120 An alias in The Directory points to a nonexistent entry.
122 .SM LDAP_INVALID_DN_SYNTAX
123 A syntactically invalid DN was specified.
126 The object specified is a leaf.
128 .SM LDAP_ALIAS_DEREF_PROBLEM
129 A problem was encountered when dereferencing an alias.
131 .SM LDAP_INAPPROPRIATE_AUTH
132 Inappropriate authentication was specified (e.g., LDAP_AUTH_SIMPLE was
133 specified and the entry does not have a userPassword attribute).
135 .SM LDAP_INVALID_CREDENTIALS
136 Invalid credentials were presented (e.g., the wrong password).
138 .SM LDAP_INSUFFICIENT_ACCESS
139 The user has insufficient access to perform the operation.
145 The DSA is unavailable.
147 .SM LDAP_UNWILLING_TO_PERFORM
148 The DSA is unwilling to perform the operation.
153 .SM LDAP_NAMING_VIOLATION
154 A naming violation occurred.
156 .SM LDAP_OBJECT_CLASS_VIOLATION
157 An object class violation occurred (e.g., a "must" attribute was missing
160 .SM LDAP_NOT_ALLOWED_ON_NONLEAF
161 The operation is not allowed on a nonleaf object.
163 .SM LDAP_NOT_ALLOWED_ON_RDN
164 The operation is not allowed on an RDN.
166 .SM LDAP_ALREADY_EXISTS
167 The entry already exists.
169 .SM LDAP_NO_OBJECT_CLASS_MODS
170 Object class modifications are not allowed.
173 An unknown error occurred.
176 The LDAP library can't contact the LDAP server.
179 Some local error occurred. This is usually a failed dynamic memory allocation.
181 .SM LDAP_ENCODING_ERROR
182 An error was encountered encoding parameters to send to the LDAP server.
184 .SM LDAP_DECODING_ERROR
185 An error was encountered decoding a result from the LDAP server.
188 A timelimit was exceeded while waiting for a result.
190 .SM LDAP_AUTH_UNKNOWN
191 The authentication method specified to ldap_bind() is not known.
193 .SM LDAP_FILTER_ERROR
194 An invalid filter was supplied to ldap_search() (e.g., unbalanced
198 An ldap routine was called with a bad parameter.
201 An memory allocation (e.g., malloc(3) or other dynamic memory
202 allocator) call failed in an ldap
209 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
211 is derived from University of Michigan LDAP 3.3 Release.