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