[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: error and tag code



Hi,

> hello!!
> 
> anybody knows where can i find the meaning of error code and tag code
> that appears in slapd.log?

Well, in the source code, of course. 

man 3 ldap_error lists all possible error values and points to the ldap.h file.

in the ldap.h file grep for error, and you will find the following:


---snip---

/*
 * possible error codes we can return
 */

#define LDAP_RANGE(n,x,y)       (((x) <= (n)) && ((n) <= (y)))

#define LDAP_SUCCESS                    0x00
#define LDAP_OPERATIONS_ERROR           0x01
#define LDAP_PROTOCOL_ERROR             0x02
#define LDAP_TIMELIMIT_EXCEEDED         0x03
#define LDAP_SIZELIMIT_EXCEEDED         0x04
#define LDAP_COMPARE_FALSE              0x05
#define LDAP_COMPARE_TRUE               0x06
#define LDAP_AUTH_METHOD_NOT_SUPPORTED  0x07
#define LDAP_STRONG_AUTH_NOT_SUPPORTED  LDAP_AUTH_METHOD_NOT_SUPPORTED
#define LDAP_STRONG_AUTH_REQUIRED       0x08
#define LDAP_PARTIAL_RESULTS            0x09    /* LDAPv2+ (not LDAPv3) */

#define LDAP_REFERRAL                           0x0a /* LDAPv3 */
#define LDAP_ADMINLIMIT_EXCEEDED        0x0b /* LDAPv3 */
#define LDAP_UNAVAILABLE_CRITICAL_EXTENSION     0x0c /* LDAPv3 */
#define LDAP_CONFIDENTIALITY_REQUIRED   0x0d /* LDAPv3 */
#define LDAP_SASL_BIND_IN_PROGRESS      0x0e /* LDAPv3 */

#define LDAP_ATTR_ERROR(n)      LDAP_RANGE((n),0x10,0x15) /* 16-21 */

#define LDAP_NO_SUCH_ATTRIBUTE          0x10
#define LDAP_UNDEFINED_TYPE             0x11
#define LDAP_INAPPROPRIATE_MATCHING     0x12
#define LDAP_CONSTRAINT_VIOLATION       0x13
#define LDAP_TYPE_OR_VALUE_EXISTS       0x14
#define LDAP_INVALID_SYNTAX             0x15

#define LDAP_NAME_ERROR(n)      LDAP_RANGE((n),0x20,0x24) /* 32-34,36 */

#define LDAP_NO_SUCH_OBJECT             0x20
#define LDAP_ALIAS_PROBLEM              0x21
#define LDAP_INVALID_DN_SYNTAX          0x22
#define LDAP_IS_LEAF                    0x23 /* not LDAPv3 */
#define LDAP_ALIAS_DEREF_PROBLEM        0x24

#define LDAP_SECURITY_ERROR(n)  LDAP_RANGE((n),0x30,0x32) /* 48-50 */

#define LDAP_INAPPROPRIATE_AUTH         0x30
#define LDAP_INVALID_CREDENTIALS        0x31
#define LDAP_INSUFFICIENT_ACCESS        0x32

#define LDAP_SERVICE_ERROR(n)   LDAP_RANGE((n),0x33,0x36) /* 51-54 */

#define LDAP_BUSY                       0x33
#define LDAP_UNAVAILABLE                0x34
#define LDAP_UNWILLING_TO_PERFORM       0x35
#define LDAP_LOOP_DETECT                0x36

#define LDAP_UPDATE_ERROR(n)    LDAP_RANGE((n),0x40,0x47) /* 64-69,71 */

#define LDAP_NAMING_VIOLATION           0x40
#define LDAP_OBJECT_CLASS_VIOLATION     0x41
#define LDAP_NOT_ALLOWED_ON_NONLEAF     0x42
#define LDAP_NOT_ALLOWED_ON_RDN         0x43
#define LDAP_ALREADY_EXISTS             0x44
#define LDAP_NO_OBJECT_CLASS_MODS       0x45
#define LDAP_RESULTS_TOO_LARGE          0x46 /* CLDAP */
#define LDAP_AFFECTS_MULTIPLE_DSAS      0x47 /* LDAPv3 */

#define LDAP_OTHER                      0x50

#define LDAP_API_ERROR(n)               LDAP_RANGE((n),0x51,0x61) /* 81-97 */
#define LDAP_API_RESULT(n)              (((n) == LDAP_SUCCESS) || \
                                                                       
LDAP_RANGE((n),0x51,0x61)) /* 0,81-97 */

#define LDAP_SERVER_DOWN                0x51
#define LDAP_LOCAL_ERROR                0x52
#define LDAP_ENCODING_ERROR             0x53
#define LDAP_DECODING_ERROR             0x54
#define LDAP_TIMEOUT                    0x55
#define LDAP_AUTH_UNKNOWN               0x56
#define LDAP_FILTER_ERROR               0x57
#define LDAP_USER_CANCELLED             0x58
#define LDAP_PARAM_ERROR                0x59
#define LDAP_NO_MEMORY                  0x5a

---snip---

Just convert the slapd.log error values into hex.


Regards,

Josef Irnberger

p.s.: Thats why I love open source software! Those who are not to lazy for
looking at the code can find all answers... but still, wouldn't this be a good
question to be added to the
faq?