]> git.sur5r.net Git - openldap/blob - doc/man/man3/ldap_error.3
Rename LDAP_OPT_ERROR_NUMBER to LDAP_OPT_RESULT_CODE.
[openldap] / doc / man / man3 / ldap_error.3
1 .TH LDAP_ERROR 3 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-2003 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5 .SH NAME
6 ldap_perror, ld_errno, ldap_result2error, ldap_errlist, ldap_err2string \- LDAP protocol error handling routines
7 .SH LIBRARY
8 OpenLDAP LDAP (libldap, -lldap)
9 .SH SYNOPSIS
10 .nf
11 .ft B
12 #include <ldap.h>
13 .LP
14 .ft B
15 char *ldap_err2string( int err );
16 .LP
17 .ft B
18 void ldap_perror( LDAP *ld, const char *s )
19 .LP
20 .ft B
21 int ldap_result2error( LDAP *ld, LDAPMessage *res, int freeit )
22 .SH DESCRIPTION
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
26 is accessible using
27 .BR ldap_get_option (3)
28 and
29 .BR ldap_set_option (3)
30 with the
31 .B LDAP_OPT_RESULT_CODE
32 option (previously called
33 .BR LDAP_OPT_ERROR_NUMBER ).
34 .LP
35 The
36 .B ldap_result2error()
37 routine takes \fIres\fP, a result as produced by
38 .BR ldap_result (3)
39 or
40 .BR ldap_search_s (3),
41 and returns
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
45 .BR ldap_msgfree (3)
46 after the error code has been extracted.  The
47 .B ld_errno
48 field in \fIld\fP is set and returned.
49 .LP
50 The returned value can be passed to
51 .B ldap_err2string()
52 to get a text description of the message.  The string
53 returned from
54 .B ldap_err2string()
55 is a pointer to a static area that
56 should not be modified.
57 .LP
58 The
59 .B ldap_perror()
60 routine can be called to print an indication of
61 the error on standard error, similar to the way
62 .BR perror (3)
63 works.
64 .SH ERRORS
65 The possible values for an ldap error code are:
66 .LP
67 .TP 20
68 .SM LDAP_SUCCESS
69 The request was successful.
70 .TP
71 .SM LDAP_OPERATIONS_ERROR
72 An operations error occurred.
73 .TP
74 .SM LDAP_PROTOCOL_ERROR
75 A protocol violation was detected.
76 .TP
77 .SM LDAP_TIMELIMIT_EXCEEDED
78 An LDAP time limit was exceeded.
79 .TP
80 .SM LDAP_SIZELIMIT_EXCEEDED
81 An LDAP size limit was exceeded.
82 .TP
83 .SM LDAP_COMPARE_FALSE
84 A compare operation returned false.
85 .TP
86 .SM LDAP_COMPARE_TRUE
87 A compare operation returned true.
88 .TP
89 .SM LDAP_STRONG_AUTH_NOT_SUPPORTED
90 The LDAP server does not support strong authentication.
91 .TP
92 .SM LDAP_STRONG_AUTH_REQUIRED
93 Strong authentication is required for the operation.
94 .TP
95 .SM LDAP_PARTIAL_RESULTS
96 Partial results only returned.
97 .TP
98 .SM LDAP_NO_SUCH_ATTRIBUTE
99 The attribute type specified does not exist in the entry.
100 .TP
101 .SM LDAP_UNDEFINED_TYPE
102 The attribute type specified is invalid.
103 .TP
104 .SM LDAP_INAPPROPRIATE_MATCHING
105 Filter type not supported for the specified attribute.
106 .TP
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).
110 .TP
111 .SM LDAP_TYPE_OR_VALUE_EXISTS
112 An attribute type or attribute value specified already exists in the entry.
113 .TP
114 .SM LDAP_INVALID_SYNTAX
115 An invalid attribute value was specified.
116 .TP
117 .SM LDAP_NO_SUCH_OBJECT
118 The specified object does not exist in The Directory.
119 .TP
120 .SM LDAP_ALIAS_PROBLEM
121 An alias in The Directory points to a nonexistent entry.
122 .TP
123 .SM LDAP_INVALID_DN_SYNTAX
124 A syntactically invalid DN was specified.
125 .TP
126 .SM LDAP_IS_LEAF
127 The object specified is a leaf.
128 .TP
129 .SM LDAP_ALIAS_DEREF_PROBLEM
130 A problem was encountered when dereferencing an alias.
131 .TP
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).
135 .TP
136 .SM LDAP_INVALID_CREDENTIALS
137 Invalid credentials were presented (e.g., the wrong password).
138 .TP
139 .SM LDAP_INSUFFICIENT_ACCESS
140 The user has insufficient access to perform the operation.
141 .TP
142 .SM LDAP_BUSY
143 The DSA is busy.
144 .TP
145 .SM LDAP_UNAVAILABLE
146 The DSA is unavailable.
147 .TP
148 .SM LDAP_UNWILLING_TO_PERFORM
149 The DSA is unwilling to perform the operation.
150 .TP
151 .SM LDAP_LOOP_DETECT
152 A loop was detected.
153 .TP
154 .SM LDAP_NAMING_VIOLATION
155 A naming violation occurred.
156 .TP
157 .SM LDAP_OBJECT_CLASS_VIOLATION
158 An object class violation occurred (e.g., a "must" attribute was missing
159 from the entry).
160 .TP
161 .SM LDAP_NOT_ALLOWED_ON_NONLEAF
162 The operation is not allowed on a nonleaf object.
163 .TP
164 .SM LDAP_NOT_ALLOWED_ON_RDN
165 The operation is not allowed on an RDN.
166 .TP
167 .SM LDAP_ALREADY_EXISTS
168 The entry already exists.
169 .TP
170 .SM LDAP_NO_OBJECT_CLASS_MODS
171 Object class modifications are not allowed.
172 .TP
173 .SM LDAP_OTHER
174 An unknown error occurred.
175 .TP
176 .SM LDAP_SERVER_DOWN
177 The LDAP library can't contact the LDAP server.
178 .TP
179 .SM LDAP_LOCAL_ERROR
180 Some local error occurred.  This is usually a failed dynamic memory allocation.
181 .TP
182 .SM LDAP_ENCODING_ERROR
183 An error was encountered encoding parameters to send to the LDAP server.
184 .TP
185 .SM LDAP_DECODING_ERROR
186 An error was encountered decoding a result from the LDAP server.
187 .TP
188 .SM LDAP_TIMEOUT
189 A timelimit was exceeded while waiting for a result.
190 .TP
191 .SM LDAP_AUTH_UNKNOWN
192 The authentication method specified to ldap_bind() is not known.
193 .TP
194 .SM LDAP_FILTER_ERROR
195 An invalid filter was supplied to ldap_search() (e.g., unbalanced
196 parentheses).
197 .TP
198 .SM LDAP_PARAM_ERROR
199 An ldap routine was called with a bad parameter.
200 .TP
201 .SM LDAP_NO_MEMORY
202 An memory allocation (e.g., malloc(3) or other dynamic memory
203 allocator) call failed in an ldap
204 library routine.
205 .SH SEE ALSO
206 .BR ldap (3),
207 .BR perror (3)
208 .SH ACKNOWLEDGEMENTS
209 .B OpenLDAP
210 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
211 .B OpenLDAP
212 is derived from University of Michigan LDAP 3.3 Release.