s3:net_idmap_dump deal with idmap config * : backend config style
[Samba/gebeck_regimport.git] / lib / ldb / include / ldb_errors.h
blobb247fbe09c484823249abf15624ccc770cc1e485
1 /*
2 ldb database library
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
8 ** under the LGPL
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/>.
25 * Name: ldb
27 * Component: ldb header
29 * Description: defines error codes following RFC 2251 ldap error codes
31 * Author: Simo Sorce
34 #ifndef _LDB_ERRORS_H_
36 /*! \cond DOXYGEN_IGNORE */
37 #define _LDB_ERRORS_H_ 1
38 /*! \endcond */
40 /**
41 \file ldb_errors.h
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
55 avoid overlap.
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>.
62 /**
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
67 successfully.
69 #define LDB_SUCCESS 0
71 /**
72 The function call failed for some non-specific reason.
74 #define LDB_ERR_OPERATIONS_ERROR 1
76 /**
77 The function call failed because of a protocol violation.
79 #define LDB_ERR_PROTOCOL_ERROR 2
81 /**
82 The function call failed because a time limit was exceeded.
84 #define LDB_ERR_TIME_LIMIT_EXCEEDED 3
86 /**
87 The function call failed because a size limit was exceeded.
89 #define LDB_ERR_SIZE_LIMIT_EXCEEDED 4
91 /**
92 The function was for value comparison, and the comparison operation
93 returned false.
95 \note This is a status value, and doesn't normally indicate an
96 error.
98 #define LDB_ERR_COMPARE_FALSE 5
101 The function was for value comparison, and the comparison operation
102 returned true.
104 \note This is a status value, and doesn't normally indicate an
105 error.
107 #define LDB_ERR_COMPARE_TRUE 6
110 The function used an authentication method that is not supported by
111 the database.
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
120 backend.
122 #define LDB_ERR_STRONG_AUTH_REQUIRED 8
124 /* 9 RESERVED */
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
133 exceeded.
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
154 error has occurred.
156 #define LDB_ERR_SASL_BIND_IN_PROGRESS 14
159 The function referred to an attribute type that is not present in
160 the entry.
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
171 specified attribute.
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
187 The function used an invalid (incorrect syntax) attribute value.
189 #define LDB_ERR_INVALID_ATTRIBUTE_SYNTAX 21
191 /* 22-31 unused */
194 The function referred to an object that does not exist in the
195 database.
197 #define LDB_ERR_NO_SUCH_OBJECT 32
200 The function referred to an alias which points to a non-existent
201 object in the database.
203 #define LDB_ERR_ALIAS_PROBLEM 33
206 The function used a DN which was invalid (incorrect syntax).
208 #define LDB_ERR_INVALID_DN_SYNTAX 34
210 /* 35 RESERVED */
213 The function required dereferencing of an alias, and something went
214 wrong during the dereferencing process.
216 #define LDB_ERR_ALIAS_DEREFERENCING_PROBLEM 36
218 /* 37-47 unused */
221 The function passed in the wrong authentication method.
223 #define LDB_ERR_INAPPROPRIATE_AUTHENTICATION 48
226 The function passed in or referenced incorrect credentials during
227 authentication.
229 #define LDB_ERR_INVALID_CREDENTIALS 49
232 The function required access permissions that the user does not
233 possess.
235 #define LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS 50
238 The function required a transaction or call that the database could
239 not perform because it is busy.
241 #define LDB_ERR_BUSY 51
244 The function required a transaction or call to a database that is
245 not available.
247 #define LDB_ERR_UNAVAILABLE 52
250 The function required a transaction or call to a database that the
251 database declined to perform.
253 #define LDB_ERR_UNWILLING_TO_PERFORM 53
256 The function failed because it resulted in a loop being detected.
258 #define LDB_ERR_LOOP_DETECT 54
260 /* 55-63 unused */
263 The function failed because it would have violated a naming rule.
265 #define LDB_ERR_NAMING_VIOLATION 64
268 The function failed because it would have violated the schema.
270 #define LDB_ERR_OBJECT_CLASS_VIOLATION 65
273 The function required an operation that is only allowed on leaf
274 objects, but the object is not a leaf.
276 #define LDB_ERR_NOT_ALLOWED_ON_NON_LEAF 66
279 The function required an operation that cannot be performed on a
280 Relative DN, but the object is a Relative DN.
282 #define LDB_ERR_NOT_ALLOWED_ON_RDN 67
285 The function failed because the entry already exists.
287 #define LDB_ERR_ENTRY_ALREADY_EXISTS 68
290 The function failed because modifications to an object class are
291 not allowable.
293 #define LDB_ERR_OBJECT_CLASS_MODS_PROHIBITED 69
295 /* 70 RESERVED FOR CLDAP */
298 The function failed because it needed to be applied to multiple
299 databases.
301 #define LDB_ERR_AFFECTS_MULTIPLE_DSAS 71
303 /* 72-79 unused */
306 The function failed for unknown reasons.
308 #define LDB_ERR_OTHER 80
310 /* 81-90 RESERVED for APIs */
312 #endif /* _LDB_ERRORS_H_ */