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