2005-09-18 14:45:28 +04:00
/*
ldb database library
Copyright ( C ) Simo Sorce 2005
* * NOTE ! The following LGPL license applies to the ldb
* * library . This does NOT imply that all of Samba is released
* * under the LGPL
This library is free software ; you can redistribute it and / or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2 of the License , or ( at your option ) any later version .
This library is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU
Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public
License along with this library ; if not , write to the Free Software
Foundation , Inc . , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA
*/
/*
* Name : ldb
*
* Component : ldb header
*
* Description : defines error codes following RFC 2251 ldap error codes
*
* Author : Simo Sorce
*/
# ifndef _LDB_ERRORS_H_
2006-01-11 19:31:57 +03:00
/*! \cond DOXYGEN_IGNORE */
2005-09-18 14:45:28 +04:00
# define _LDB_ERRORS_H_ 1
2006-01-11 19:31:57 +03:00
/*! \endcond */
2005-09-18 14:45:28 +04:00
2006-01-11 19:31:57 +03:00
/**
\ file ldb_errors . h
This header provides a set of result codes for LDB function calls .
Many LDB function calls return an integer value ( int ) . As shown in
the function documentation , those return values may indicate
whether the function call worked correctly ( in which case it
returns LDB_SUCCESS ) or some problem occurred ( in which case some
other value will be returned ) . As a special case ,
LDB_ERR_COMPARE_FALSE or LDB_ERR_COMPARE_TRUE may be returned ,
which does not indicate an error .
\ note Not all error codes make sense for LDB , however they are
based on the LDAP error codes , and are kept for reference and to
avoid overlap .
\ note Some of this documentation is based on information in
the OpenLDAP documentation , as developed and maintained by the
< a href = " http://www.openldap.org/ " > The OpenLDAP Project < / a > .
2005-09-18 14:45:28 +04:00
*/
2006-01-11 19:31:57 +03:00
/**
The function call succeeded .
If a function returns LDB_SUCCESS , then that function , and the
underlying transactions that may have been required , completed
successfully .
*/
2005-09-24 19:42:15 +04:00
# define LDB_SUCCESS 0
2006-01-11 19:31:57 +03:00
/**
The function call failed for some non - specific reason .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_OPERATIONS_ERROR 1
2006-01-11 19:31:57 +03:00
/**
The function call failed because of a protocol violation .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_PROTOCOL_ERROR 2
2006-01-11 19:31:57 +03:00
/**
The function call failed because a time limit was exceeded .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_TIME_LIMIT_EXCEEDED 3
2006-01-11 19:31:57 +03:00
/**
The function call failed because a size limit was exceeded .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_SIZE_LIMIT_EXCEEDED 4
2006-01-11 19:31:57 +03:00
/**
The function was for value comparison , and the comparison operation
returned false .
\ note This is a status value , and doesn ' t normally indicate an
error .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_COMPARE_FALSE 5
2006-01-11 19:31:57 +03:00
/**
The function was for value comparison , and the comparison operation
returned true .
\ note This is a status value , and doesn ' t normally indicate an
error .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_COMPARE_TRUE 6
2006-01-11 19:31:57 +03:00
/**
The function used an authentication method that is not supported by
the database .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_AUTH_METHOD_NOT_SUPPORTED 7
2006-01-11 19:31:57 +03:00
/**
The function call required a underlying operation that required
strong authentication .
This will normally only occur if you are using LDB with a LDAP
backend .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_STRONG_AUTH_REQUIRED 8
/* 9 RESERVED */
2006-01-11 19:31:57 +03:00
/**
The function resulted in a referral to another server .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_REFERRAL 10
2006-01-11 19:31:57 +03:00
/**
The function failed because an administrative / policy limit was
exceeded .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_ADMIN_LIMIT_EXCEEDED 11
2006-01-11 19:31:57 +03:00
/**
The function required an extension or capability that the
database cannot provide .
*/
2006-01-06 07:01:23 +03:00
# define LDB_ERR_UNSUPPORTED_CRITICAL_EXTENSION 12
2006-01-11 19:31:57 +03:00
/**
The function involved a transaction or database operation that
could not be performed without a secure link .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_CONFIDENTIALITY_REQUIRED 13
2006-01-11 19:31:57 +03:00
/**
This is an intermediate result code for SASL bind operations that
have more than one step .
\ note This is a result code that does not normally indicate an
error has occurred .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_SASL_BIND_IN_PROGRESS 14
2006-01-11 19:31:57 +03:00
/**
The function referred to an attribute type that is not present in
the entry .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_NO_SUCH_ATTRIBUTE 16
2006-01-11 19:31:57 +03:00
/**
The function referred to an attribute type that is invalid
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_UNDEFINED_ATTRIBUTE_TYPE 17
2006-01-11 19:31:57 +03:00
/**
The function required a filter type that is not available for the
specified attribute .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_INAPPROPRIATE_MATCHING 18
2006-01-11 19:31:57 +03:00
/**
The function would have violated an attribute constraint .
*/
# define LDB_ERR_CONSTRAINT_VIOLATION 19
/**
The function involved an attribute type or attribute value that
already exists in the entry .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS 20
2006-01-11 19:31:57 +03:00
/**
The function used an invalid ( incorrect syntax ) attribute value .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_INVALID_ATTRIBUTE_SYNTAX 21
2006-01-11 19:31:57 +03:00
2005-09-18 14:45:28 +04:00
/* 22-31 unused */
2006-01-11 19:31:57 +03:00
/**
The function referred to an object that does not exist in the
database .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_NO_SUCH_OBJECT 32
2006-01-11 19:31:57 +03:00
/**
The function referred to an alias which points to a non - existant
object in the database .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_ALIAS_PROBLEM 33
2006-01-11 19:31:57 +03:00
/**
The function used a DN which was invalid ( incorrect syntax ) .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_INVALID_DN_SYNTAX 34
2006-01-11 19:31:57 +03:00
2006-04-16 10:02:13 +04:00
/* 35 RESERVED */
2006-01-11 19:31:57 +03:00
/**
The function required dereferencing of an alias , and something went
wrong during the dereferencing process .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_ALIAS_DEREFERENCING_PROBLEM 36
2006-01-11 19:31:57 +03:00
2005-09-18 14:45:28 +04:00
/* 37-47 unused */
2006-01-11 19:31:57 +03:00
/**
The function passed in the wrong authentication method .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_INAPPROPRIATE_AUTHENTICATION 48
2006-01-11 19:31:57 +03:00
/**
The function passed in or referenced incorrect credentials during
authentication .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_INVALID_CREDENTIALS 49
2006-01-11 19:31:57 +03:00
/**
The function required access permissions that the user does not
possess .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS 50
2006-01-11 19:31:57 +03:00
/**
The function required a transaction or call that the database could
not perform because it is busy .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_BUSY 51
2006-01-11 19:31:57 +03:00
/**
The function required a transaction or call to a database that is
not available .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_UNAVAILABLE 52
2006-01-11 19:31:57 +03:00
/**
The function required a transaction or call to a database that the
database declined to perform .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_UNWILLING_TO_PERFORM 53
2006-01-11 19:31:57 +03:00
/**
The function failed because it resulted in a loop being detected .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_LOOP_DETECT 54
2006-01-11 19:31:57 +03:00
2005-09-18 14:45:28 +04:00
/* 55-63 unused */
2006-01-11 19:31:57 +03:00
/**
The function failed because it would have violated a naming rule .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_NAMING_VIOLATION 64
2006-01-11 19:31:57 +03:00
/**
The function failed because it would have violated the schema .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_OBJECT_CLASS_VIOLATION 65
2006-01-11 19:31:57 +03:00
/**
The function required an operation that is only allowed on leaf
objects , but the object is not a leaf .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_NOT_ALLOWED_ON_NON_LEAF 66
2006-01-11 19:31:57 +03:00
/**
The function required an operation that cannot be performed on a
Relative DN , but the object is a Relative DN .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_NOT_ALLOWED_ON_RDN 67
2006-01-11 19:31:57 +03:00
/**
The function failed because the entry already exists .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_ENTRY_ALREADY_EXISTS 68
2006-01-11 19:31:57 +03:00
/**
The function failed because modifications to an object class are
not allowable .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_OBJECT_CLASS_MODS_PROHIBITED 69
2006-01-11 19:31:57 +03:00
2005-09-18 14:45:28 +04:00
/* 70 RESERVED FOR CLDAP */
2006-01-11 19:31:57 +03:00
/**
The function failed because it needed to be applied to multiple
databases .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_AFFECTS_MULTIPLE_DSAS 71
2006-01-11 19:31:57 +03:00
2005-09-18 14:45:28 +04:00
/* 72-79 unused */
2006-01-11 19:31:57 +03:00
/**
The function failed for unknown reasons .
*/
2005-09-18 14:45:28 +04:00
# define LDB_ERR_OTHER 80
2006-01-11 19:31:57 +03:00
2005-09-18 14:45:28 +04:00
/* 81-90 RESERVED for APIs */
# endif /* _LDB_ERRORS_H_ */