4 Copyright (C) Simo Sorce 2005
6 ** NOTE! The following LGPL license applies to the ldb
7 ** library. This does NOT imply that all of Samba is released
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 3 of the License, or (at your option) any later version.
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public
21 License along with this library; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 * Component: ldb header
30 * Description: defines error codes following RFC 2251 ldap error codes
35 #ifndef _LDB_ERRORS_H_
37 /*! \cond DOXYGEN_IGNORE */
38 #define _LDB_ERRORS_H_ 1
44 This header provides a set of result codes for LDB function calls.
46 Many LDB function calls return an integer value (int). As shown in
47 the function documentation, those return values may indicate
48 whether the function call worked correctly (in which case it
49 returns LDB_SUCCESS) or some problem occurred (in which case some
50 other value will be returned). As a special case,
51 LDB_ERR_COMPARE_FALSE or LDB_ERR_COMPARE_TRUE may be returned,
52 which does not indicate an error.
54 \note Not all error codes make sense for LDB, however they are
55 based on the LDAP error codes, and are kept for reference and to
58 \note Some of this documentation is based on information in
59 the OpenLDAP documentation, as developed and maintained by the
60 <a href="http://www.openldap.org/">The OpenLDAP Project</a>.
64 The function call succeeded.
66 If a function returns LDB_SUCCESS, then that function, and the
67 underlying transactions that may have been required, completed
73 The function call failed for some non-specific reason.
75 #define LDB_ERR_OPERATIONS_ERROR 1
78 The function call failed because of a protocol violation.
80 #define LDB_ERR_PROTOCOL_ERROR 2
83 The function call failed because a time limit was exceeded.
85 #define LDB_ERR_TIME_LIMIT_EXCEEDED 3
88 The function call failed because a size limit was exceeded.
90 #define LDB_ERR_SIZE_LIMIT_EXCEEDED 4
93 The function was for value comparison, and the comparison operation
96 \note This is a status value, and doesn't normally indicate an
99 #define LDB_ERR_COMPARE_FALSE 5
102 The function was for value comparison, and the comparison operation
105 \note This is a status value, and doesn't normally indicate an
108 #define LDB_ERR_COMPARE_TRUE 6
111 The function used an authentication method that is not supported by
114 #define LDB_ERR_AUTH_METHOD_NOT_SUPPORTED 7
117 The function call required a underlying operation that required
118 strong authentication.
120 This will normally only occur if you are using LDB with a LDAP
123 #define LDB_ERR_STRONG_AUTH_REQUIRED 8
127 The function resulted in a referral to another server.
129 #define LDB_ERR_REFERRAL 10
132 The function failed because an administrative / policy limit was
135 #define LDB_ERR_ADMIN_LIMIT_EXCEEDED 11
138 The function required an extension or capability that the
139 database cannot provide.
141 #define LDB_ERR_UNSUPPORTED_CRITICAL_EXTENSION 12
144 The function involved a transaction or database operation that
145 could not be performed without a secure link.
147 #define LDB_ERR_CONFIDENTIALITY_REQUIRED 13
150 This is an intermediate result code for SASL bind operations that
151 have more than one step.
153 \note This is a result code that does not normally indicate an
156 #define LDB_ERR_SASL_BIND_IN_PROGRESS 14
159 The function referred to an attribute type that is not present in
162 #define LDB_ERR_NO_SUCH_ATTRIBUTE 16
165 The function referred to an attribute type that is invalid
167 #define LDB_ERR_UNDEFINED_ATTRIBUTE_TYPE 17
170 The function required a filter type that is not available for the
173 #define LDB_ERR_INAPPROPRIATE_MATCHING 18
176 The function would have violated an attribute constraint.
178 #define LDB_ERR_CONSTRAINT_VIOLATION 19
181 The function involved an attribute type or attribute value that
182 already exists in the entry.
184 #define LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS 20
186 The function used an invalid (incorrect syntax) attribute value.
188 #define LDB_ERR_INVALID_ATTRIBUTE_SYNTAX 21
193 The function referred to an object that does not exist in the
196 #define LDB_ERR_NO_SUCH_OBJECT 32
199 The function referred to an alias which points to a non-existant
200 object in the database.
202 #define LDB_ERR_ALIAS_PROBLEM 33
205 The function used a DN which was invalid (incorrect syntax).
207 #define LDB_ERR_INVALID_DN_SYNTAX 34
212 The function required dereferencing of an alias, and something went
213 wrong during the dereferencing process.
215 #define LDB_ERR_ALIAS_DEREFERENCING_PROBLEM 36
220 The function passed in the wrong authentication method.
222 #define LDB_ERR_INAPPROPRIATE_AUTHENTICATION 48
225 The function passed in or referenced incorrect credentials during
228 #define LDB_ERR_INVALID_CREDENTIALS 49
231 The function required access permissions that the user does not
234 #define LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS 50
237 The function required a transaction or call that the database could
238 not perform because it is busy.
240 #define LDB_ERR_BUSY 51
243 The function required a transaction or call to a database that is
246 #define LDB_ERR_UNAVAILABLE 52
249 The function required a transaction or call to a database that the
250 database declined to perform.
252 #define LDB_ERR_UNWILLING_TO_PERFORM 53
255 The function failed because it resulted in a loop being detected.
257 #define LDB_ERR_LOOP_DETECT 54
262 The function failed because it would have violated a naming rule.
264 #define LDB_ERR_NAMING_VIOLATION 64
267 The function failed because it would have violated the schema.
269 #define LDB_ERR_OBJECT_CLASS_VIOLATION 65
272 The function required an operation that is only allowed on leaf
273 objects, but the object is not a leaf.
275 #define LDB_ERR_NOT_ALLOWED_ON_NON_LEAF 66
278 The function required an operation that cannot be performed on a
279 Relative DN, but the object is a Relative DN.
281 #define LDB_ERR_NOT_ALLOWED_ON_RDN 67
284 The function failed because the entry already exists.
286 #define LDB_ERR_ENTRY_ALREADY_EXISTS 68
289 The function failed because modifications to an object class are
292 #define LDB_ERR_OBJECT_CLASS_MODS_PROHIBITED 69
294 /* 70 RESERVED FOR CLDAP */
297 The function failed because it needed to be applied to multiple
300 #define LDB_ERR_AFFECTS_MULTIPLE_DSAS 71
305 The function failed for unknown reasons.
307 #define LDB_ERR_OTHER 80
309 /* 81-90 RESERVED for APIs */
311 #endif /* _LDB_ERRORS_H_ */