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