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