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