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, see <http://www.gnu.org/licenses/>.
27
* Component: ldb header
29
* Description: defines error codes following RFC 2251 ldap error codes
34
#ifndef _LDB_ERRORS_H_
36
/*! \cond DOXYGEN_IGNORE */
37
#define _LDB_ERRORS_H_ 1
43
This header provides a set of result codes for LDB function calls.
45
Many LDB function calls return an integer value (int). As shown in
46
the function documentation, those return values may indicate
47
whether the function call worked correctly (in which case it
48
returns LDB_SUCCESS) or some problem occurred (in which case some
49
other value will be returned). As a special case,
50
LDB_ERR_COMPARE_FALSE or LDB_ERR_COMPARE_TRUE may be returned,
51
which does not indicate an error.
53
\note Not all error codes make sense for LDB, however they are
54
based on the LDAP error codes, and are kept for reference and to
57
\note Some of this documentation is based on information in
58
the OpenLDAP documentation, as developed and maintained by the
59
<a href="http://www.openldap.org/">The OpenLDAP Project</a>.
63
The function call succeeded.
65
If a function returns LDB_SUCCESS, then that function, and the
66
underlying transactions that may have been required, completed
72
The function call failed for some non-specific reason.
74
#define LDB_ERR_OPERATIONS_ERROR 1
77
The function call failed because of a protocol violation.
79
#define LDB_ERR_PROTOCOL_ERROR 2
82
The function call failed because a time limit was exceeded.
84
#define LDB_ERR_TIME_LIMIT_EXCEEDED 3
87
The function call failed because a size limit was exceeded.
89
#define LDB_ERR_SIZE_LIMIT_EXCEEDED 4
92
The function was for value comparison, and the comparison operation
95
\note This is a status value, and doesn't normally indicate an
98
#define LDB_ERR_COMPARE_FALSE 5
101
The function was for value comparison, and the comparison operation
104
\note This is a status value, and doesn't normally indicate an
107
#define LDB_ERR_COMPARE_TRUE 6
110
The function used an authentication method that is not supported by
113
#define LDB_ERR_AUTH_METHOD_NOT_SUPPORTED 7
116
The function call required a underlying operation that required
117
strong authentication.
119
This will normally only occur if you are using LDB with a LDAP
122
#define LDB_ERR_STRONG_AUTH_REQUIRED 8
126
The function resulted in a referral to another server.
128
#define LDB_ERR_REFERRAL 10
131
The function failed because an administrative / policy limit was
134
#define LDB_ERR_ADMIN_LIMIT_EXCEEDED 11
137
The function required an extension or capability that the
138
database cannot provide.
140
#define LDB_ERR_UNSUPPORTED_CRITICAL_EXTENSION 12
143
The function involved a transaction or database operation that
144
could not be performed without a secure link.
146
#define LDB_ERR_CONFIDENTIALITY_REQUIRED 13
149
This is an intermediate result code for SASL bind operations that
150
have more than one step.
152
\note This is a result code that does not normally indicate an
155
#define LDB_ERR_SASL_BIND_IN_PROGRESS 14
158
The function referred to an attribute type that is not present in
161
#define LDB_ERR_NO_SUCH_ATTRIBUTE 16
164
The function referred to an attribute type that is invalid
166
#define LDB_ERR_UNDEFINED_ATTRIBUTE_TYPE 17
169
The function required a filter type that is not available for the
172
#define LDB_ERR_INAPPROPRIATE_MATCHING 18
175
The function would have violated an attribute constraint.
177
#define LDB_ERR_CONSTRAINT_VIOLATION 19
180
The function involved an attribute type or attribute value that
181
already exists in the entry.
183
#define LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS 20
185
The function used an invalid (incorrect syntax) attribute value.
187
#define LDB_ERR_INVALID_ATTRIBUTE_SYNTAX 21
192
The function referred to an object that does not exist in the
195
#define LDB_ERR_NO_SUCH_OBJECT 32
198
The function referred to an alias which points to a non-existant
199
object in the database.
201
#define LDB_ERR_ALIAS_PROBLEM 33
204
The function used a DN which was invalid (incorrect syntax).
206
#define LDB_ERR_INVALID_DN_SYNTAX 34
211
The function required dereferencing of an alias, and something went
212
wrong during the dereferencing process.
214
#define LDB_ERR_ALIAS_DEREFERENCING_PROBLEM 36
219
The function passed in the wrong authentication method.
221
#define LDB_ERR_INAPPROPRIATE_AUTHENTICATION 48
224
The function passed in or referenced incorrect credentials during
227
#define LDB_ERR_INVALID_CREDENTIALS 49
230
The function required access permissions that the user does not
233
#define LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS 50
236
The function required a transaction or call that the database could
237
not perform because it is busy.
239
#define LDB_ERR_BUSY 51
242
The function required a transaction or call to a database that is
245
#define LDB_ERR_UNAVAILABLE 52
248
The function required a transaction or call to a database that the
249
database declined to perform.
251
#define LDB_ERR_UNWILLING_TO_PERFORM 53
254
The function failed because it resulted in a loop being detected.
256
#define LDB_ERR_LOOP_DETECT 54
261
The function failed because it would have violated a naming rule.
263
#define LDB_ERR_NAMING_VIOLATION 64
266
The function failed because it would have violated the schema.
268
#define LDB_ERR_OBJECT_CLASS_VIOLATION 65
271
The function required an operation that is only allowed on leaf
272
objects, but the object is not a leaf.
274
#define LDB_ERR_NOT_ALLOWED_ON_NON_LEAF 66
277
The function required an operation that cannot be performed on a
278
Relative DN, but the object is a Relative DN.
280
#define LDB_ERR_NOT_ALLOWED_ON_RDN 67
283
The function failed because the entry already exists.
285
#define LDB_ERR_ENTRY_ALREADY_EXISTS 68
288
The function failed because modifications to an object class are
291
#define LDB_ERR_OBJECT_CLASS_MODS_PROHIBITED 69
293
/* 70 RESERVED FOR CLDAP */
296
The function failed because it needed to be applied to multiple
299
#define LDB_ERR_AFFECTS_MULTIPLE_DSAS 71
304
The function failed for unknown reasons.
306
#define LDB_ERR_OTHER 80
308
/* 81-90 RESERVED for APIs */
310
#endif /* _LDB_ERRORS_H_ */