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