source: vendor/current/source3/lib/ldb/include/ldb_errors.h@ 414

Last change on this file since 414 was 414, checked in by Herwig Bauernfeind, 15 years ago

Samba 3.5.0: Initial import

File size: 7.5 KB
Line 
1/*
2 ldb database library
3
4 Copyright (C) Simo Sorce 2005
5
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
9
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.
14
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.
19
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/>.
22*/
23
24/*
25 * Name: ldb
26 *
27 * Component: ldb header
28 *
29 * Description: defines error codes following RFC 2251 ldap error codes
30 *
31 * Author: Simo Sorce
32 */
33
34#ifndef _LDB_ERRORS_H_
35
36/*! \cond DOXYGEN_IGNORE */
37#define _LDB_ERRORS_H_ 1
38/*! \endcond */
39
40/**
41 \file ldb_errors.h
42
43 This header provides a set of result codes for LDB function calls.
44
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.
52
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.
56
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>.
60 */
61
62/**
63 The function call succeeded.
64
65 If a function returns LDB_SUCCESS, then that function, and the
66 underlying transactions that may have been required, completed
67 successfully.
68*/
69#define LDB_SUCCESS 0
70
71/**
72 The function call failed for some non-specific reason.
73*/
74#define LDB_ERR_OPERATIONS_ERROR 1
75
76/**
77 The function call failed because of a protocol violation.
78*/
79#define LDB_ERR_PROTOCOL_ERROR 2
80
81/**
82 The function call failed because a time limit was exceeded.
83*/
84#define LDB_ERR_TIME_LIMIT_EXCEEDED 3
85
86/**
87 The function call failed because a size limit was exceeded.
88*/
89#define LDB_ERR_SIZE_LIMIT_EXCEEDED 4
90
91/**
92 The function was for value comparison, and the comparison operation
93 returned false.
94
95 \note This is a status value, and doesn't normally indicate an
96 error.
97*/
98#define LDB_ERR_COMPARE_FALSE 5
99
100/**
101 The function was for value comparison, and the comparison operation
102 returned true.
103
104 \note This is a status value, and doesn't normally indicate an
105 error.
106*/
107#define LDB_ERR_COMPARE_TRUE 6
108
109/**
110 The function used an authentication method that is not supported by
111 the database.
112*/
113#define LDB_ERR_AUTH_METHOD_NOT_SUPPORTED 7
114
115/**
116 The function call required a underlying operation that required
117 strong authentication.
118
119 This will normally only occur if you are using LDB with a LDAP
120 backend.
121*/
122#define LDB_ERR_STRONG_AUTH_REQUIRED 8
123/* 9 RESERVED */
124
125/**
126 The function resulted in a referral to another server.
127*/
128#define LDB_ERR_REFERRAL 10
129
130/**
131 The function failed because an administrative / policy limit was
132 exceeded.
133*/
134#define LDB_ERR_ADMIN_LIMIT_EXCEEDED 11
135
136/**
137 The function required an extension or capability that the
138 database cannot provide.
139*/
140#define LDB_ERR_UNSUPPORTED_CRITICAL_EXTENSION 12
141
142/**
143 The function involved a transaction or database operation that
144 could not be performed without a secure link.
145*/
146#define LDB_ERR_CONFIDENTIALITY_REQUIRED 13
147
148/**
149 This is an intermediate result code for SASL bind operations that
150 have more than one step.
151
152 \note This is a result code that does not normally indicate an
153 error has occurred.
154*/
155#define LDB_ERR_SASL_BIND_IN_PROGRESS 14
156
157/**
158 The function referred to an attribute type that is not present in
159 the entry.
160*/
161#define LDB_ERR_NO_SUCH_ATTRIBUTE 16
162
163/**
164 The function referred to an attribute type that is invalid
165*/
166#define LDB_ERR_UNDEFINED_ATTRIBUTE_TYPE 17
167
168/**
169 The function required a filter type that is not available for the
170 specified attribute.
171*/
172#define LDB_ERR_INAPPROPRIATE_MATCHING 18
173
174/**
175 The function would have violated an attribute constraint.
176*/
177#define LDB_ERR_CONSTRAINT_VIOLATION 19
178
179/**
180 The function involved an attribute type or attribute value that
181 already exists in the entry.
182*/
183#define LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS 20
184/**
185 The function used an invalid (incorrect syntax) attribute value.
186*/
187#define LDB_ERR_INVALID_ATTRIBUTE_SYNTAX 21
188
189/* 22-31 unused */
190
191/**
192 The function referred to an object that does not exist in the
193 database.
194*/
195#define LDB_ERR_NO_SUCH_OBJECT 32
196
197/**
198 The function referred to an alias which points to a non-existant
199 object in the database.
200*/
201#define LDB_ERR_ALIAS_PROBLEM 33
202
203/**
204 The function used a DN which was invalid (incorrect syntax).
205*/
206#define LDB_ERR_INVALID_DN_SYNTAX 34
207
208/* 35 RESERVED */
209
210/**
211 The function required dereferencing of an alias, and something went
212 wrong during the dereferencing process.
213*/
214#define LDB_ERR_ALIAS_DEREFERENCING_PROBLEM 36
215
216/* 37-47 unused */
217
218/**
219 The function passed in the wrong authentication method.
220*/
221#define LDB_ERR_INAPPROPRIATE_AUTHENTICATION 48
222
223/**
224 The function passed in or referenced incorrect credentials during
225 authentication.
226*/
227#define LDB_ERR_INVALID_CREDENTIALS 49
228
229/**
230 The function required access permissions that the user does not
231 possess.
232*/
233#define LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS 50
234
235/**
236 The function required a transaction or call that the database could
237 not perform because it is busy.
238*/
239#define LDB_ERR_BUSY 51
240
241/**
242 The function required a transaction or call to a database that is
243 not available.
244*/
245#define LDB_ERR_UNAVAILABLE 52
246
247/**
248 The function required a transaction or call to a database that the
249 database declined to perform.
250*/
251#define LDB_ERR_UNWILLING_TO_PERFORM 53
252
253/**
254 The function failed because it resulted in a loop being detected.
255*/
256#define LDB_ERR_LOOP_DETECT 54
257
258/* 55-63 unused */
259
260/**
261 The function failed because it would have violated a naming rule.
262*/
263#define LDB_ERR_NAMING_VIOLATION 64
264
265/**
266 The function failed because it would have violated the schema.
267*/
268#define LDB_ERR_OBJECT_CLASS_VIOLATION 65
269
270/**
271 The function required an operation that is only allowed on leaf
272 objects, but the object is not a leaf.
273*/
274#define LDB_ERR_NOT_ALLOWED_ON_NON_LEAF 66
275
276/**
277 The function required an operation that cannot be performed on a
278 Relative DN, but the object is a Relative DN.
279*/
280#define LDB_ERR_NOT_ALLOWED_ON_RDN 67
281
282/**
283 The function failed because the entry already exists.
284*/
285#define LDB_ERR_ENTRY_ALREADY_EXISTS 68
286
287/**
288 The function failed because modifications to an object class are
289 not allowable.
290*/
291#define LDB_ERR_OBJECT_CLASS_MODS_PROHIBITED 69
292
293/* 70 RESERVED FOR CLDAP */
294
295/**
296 The function failed because it needed to be applied to multiple
297 databases.
298*/
299#define LDB_ERR_AFFECTS_MULTIPLE_DSAS 71
300
301/* 72-79 unused */
302
303/**
304 The function failed for unknown reasons.
305*/
306#define LDB_ERR_OTHER 80
307
308/* 81-90 RESERVED for APIs */
309
310#endif /* _LDB_ERRORS_H_ */
Note: See TracBrowser for help on using the repository browser.