• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/samba-3.5.8/source4/lib/ldb/include/
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
124/* 9 RESERVED */
125
126/**
127   The function resulted in a referral to another server.
128*/
129#define LDB_ERR_REFERRAL			10
130
131/**
132   The function failed because an administrative / policy limit was
133   exceeded.
134*/
135#define LDB_ERR_ADMIN_LIMIT_EXCEEDED		11
136
137/**
138   The function required an extension or capability that the
139   database cannot provide.
140*/
141#define LDB_ERR_UNSUPPORTED_CRITICAL_EXTENSION	12
142
143/**
144   The function involved a transaction or database operation that
145   could not be performed without a secure link.
146*/
147#define LDB_ERR_CONFIDENTIALITY_REQUIRED	13
148
149/**
150   This is an intermediate result code for SASL bind operations that
151   have more than one step.
152
153   \note This is a result code that does not normally indicate an
154   error has occurred.
155*/
156#define LDB_ERR_SASL_BIND_IN_PROGRESS		14
157
158/**
159   The function referred to an attribute type that is not present in
160   the entry.
161*/
162#define LDB_ERR_NO_SUCH_ATTRIBUTE		16
163
164/**
165   The function referred to an attribute type that is invalid
166*/
167#define LDB_ERR_UNDEFINED_ATTRIBUTE_TYPE	17
168
169/**
170   The function required a filter type that is not available for the
171   specified attribute.
172*/
173#define LDB_ERR_INAPPROPRIATE_MATCHING		18
174
175/**
176   The function would have violated an attribute constraint.
177*/
178#define LDB_ERR_CONSTRAINT_VIOLATION		19
179
180/**
181   The function involved an attribute type or attribute value that
182   already exists in the entry.
183*/
184#define LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS	20
185
186/**
187   The function used an invalid (incorrect syntax) attribute value.
188*/
189#define LDB_ERR_INVALID_ATTRIBUTE_SYNTAX	21
190
191/* 22-31 unused */
192
193/**
194   The function referred to an object that does not exist in the
195   database.
196*/
197#define LDB_ERR_NO_SUCH_OBJECT			32
198
199/**
200   The function referred to an alias which points to a non-existant
201   object in the database.
202*/
203#define LDB_ERR_ALIAS_PROBLEM			33
204
205/**
206   The function used a DN which was invalid (incorrect syntax).
207*/
208#define LDB_ERR_INVALID_DN_SYNTAX		34
209
210/* 35 RESERVED */
211
212/**
213   The function required dereferencing of an alias, and something went
214   wrong during the dereferencing process.
215*/
216#define LDB_ERR_ALIAS_DEREFERENCING_PROBLEM	36
217
218/* 37-47 unused */
219
220/**
221   The function passed in the wrong authentication method.
222*/
223#define LDB_ERR_INAPPROPRIATE_AUTHENTICATION	48
224
225/**
226   The function passed in or referenced incorrect credentials during
227   authentication.
228*/
229#define LDB_ERR_INVALID_CREDENTIALS		49
230
231/**
232   The function required access permissions that the user does not
233   possess.
234*/
235#define LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS	50
236
237/**
238   The function required a transaction or call that the database could
239   not perform because it is busy.
240*/
241#define LDB_ERR_BUSY				51
242
243/**
244   The function required a transaction or call to a database that is
245   not available.
246*/
247#define LDB_ERR_UNAVAILABLE			52
248
249/**
250   The function required a transaction or call to a database that the
251   database declined to perform.
252*/
253#define LDB_ERR_UNWILLING_TO_PERFORM		53
254
255/**
256   The function failed because it resulted in a loop being detected.
257*/
258#define LDB_ERR_LOOP_DETECT			54
259
260/* 55-63 unused */
261
262/**
263   The function failed because it would have violated a naming rule.
264*/
265#define LDB_ERR_NAMING_VIOLATION		64
266
267/**
268   The function failed because it would have violated the schema.
269*/
270#define LDB_ERR_OBJECT_CLASS_VIOLATION		65
271
272/**
273   The function required an operation that is only allowed on leaf
274   objects, but the object is not a leaf.
275*/
276#define LDB_ERR_NOT_ALLOWED_ON_NON_LEAF		66
277
278/**
279   The function required an operation that cannot be performed on a
280   Relative DN, but the object is a Relative DN.
281*/
282#define LDB_ERR_NOT_ALLOWED_ON_RDN		67
283
284/**
285   The function failed because the entry already exists.
286*/
287#define LDB_ERR_ENTRY_ALREADY_EXISTS		68
288
289/**
290   The function failed because modifications to an object class are
291   not allowable.
292*/
293#define LDB_ERR_OBJECT_CLASS_MODS_PROHIBITED	69
294
295/* 70 RESERVED FOR CLDAP */
296
297/**
298   The function failed because it needed to be applied to multiple
299   databases.
300*/
301#define LDB_ERR_AFFECTS_MULTIPLE_DSAS		71
302
303/* 72-79 unused */
304
305/**
306   The function failed for unknown reasons.
307*/
308#define LDB_ERR_OTHER				80
309
310/* 81-90 RESERVED for APIs */
311
312#endif /* _LDB_ERRORS_H_ */
313