r12733: Merge ldap/ldb controls into main tree
[mdw/samba.git] / source4 / lib / ldb / include / ldb_errors.h
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 2 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, write to the Free Software
22    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23 */
24
25 /*
26  *  Name: ldb
27  *
28  *  Component: ldb header
29  *
30  *  Description: defines error codes following RFC 2251 ldap error codes
31  *
32  *  Author: Simo Sorce
33  */
34
35 #ifndef _LDB_ERRORS_H_
36 #define _LDB_ERRORS_H_ 1
37
38 /* 
39  * Not all error codes make sense for ldb,
40  * but they are keept here for reference anyway
41  */
42
43 #define LDB_SUCCESS                             0
44 #define LDB_ERR_OPERATIONS_ERROR                1
45 #define LDB_ERR_PROTOCOL_ERROR                  2
46 #define LDB_ERR_TIME_LIMIT_EXCEEDED             3
47 #define LDB_ERR_SIZE_LIMIT_EXCEEDED             4
48 #define LDB_ERR_COMPARE_FALSE                   5
49 #define LDB_ERR_COMPARE_TRUE                    6
50 #define LDB_ERR_AUTH_METHOD_NOT_SUPPORTED       7
51 #define LDB_ERR_STRONG_AUTH_REQUIRED            8
52 /* 9 RESERVED */
53 #define LDB_ERR_REFERRAL                        10
54 #define LDB_ERR_ADMIN_LIMIT_EXCEEDED            11
55 #define LDB_ERR_UNSUPPORTED_CRITICAL_EXTENSION  12
56 #define LDB_ERR_CONFIDENTIALITY_REQUIRED        13
57 #define LDB_ERR_SASL_BIND_IN_PROGRESS           14
58 #define LDB_ERR_NO_SUCH_ATTRIBUTE               16
59 #define LDB_ERR_UNDEFINED_ATTRIBUTE_TYPE        17
60 #define LDB_ERR_INAPPROPRIATE_MATCHING          18
61 #define LDB_ERR_CONSTRAINT_VIOLAION             19
62 #define LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS       20
63 #define LDB_ERR_INVALID_ATTRIBUTE_SYNTAX        21
64 /* 22-31 unused */
65 #define LDB_ERR_NO_SUCH_OBJECT                  32
66 #define LDB_ERR_ALIAS_PROBLEM                   33
67 #define LDB_ERR_INVALID_DN_SYNTAX               34
68 /* 53 RESERVED */
69 #define LDB_ERR_ALIAS_DEREFERENCING_PROBLEM     36
70 /* 37-47 unused */
71 #define LDB_ERR_INAPPROPRIATE_AUTHENTICATION    48
72 #define LDB_ERR_INVALID_CREDENTIALS             49
73 #define LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS      50
74 #define LDB_ERR_BUSY                            51
75 #define LDB_ERR_UNAVAILABLE                     52
76 #define LDB_ERR_UNWILLING_TO_PERFORM            53
77 #define LDB_ERR_LOOP_DETECT                     54
78 /* 55-63 unused */
79 #define LDB_ERR_NAMING_VIOLATION                64
80 #define LDB_ERR_OBJECT_CLASS_VIOLATION          65
81 #define LDB_ERR_NOT_ALLOWED_ON_NON_LEAF         66
82 #define LDB_ERR_NOT_ALLOWED_ON_RDN              67
83 #define LDB_ERR_ENTRY_ALREADY_EXISTS            68
84 #define LDB_ERR_OBJECT_CLASS_MODS_PROHIBITED    69
85 /* 70 RESERVED FOR CLDAP */
86 #define LDB_ERR_AFFECTS_MULTIPLE_DSAS           71
87 /* 72-79 unused */
88 #define LDB_ERR_OTHER                           80
89 /* 81-90 RESERVED for APIs */
90
91 #endif /* _LDB_ERRORS_H_ */