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