1LDAP_ERROR(3)              Library Functions Manual              LDAP_ERROR(3)
2
3
4

NAME

6       ldap_perror, ld_errno, ldap_result2error, ldap_errlist, ldap_err2string
7       - LDAP protocol error handling routines
8

LIBRARY

10       OpenLDAP LDAP (libldap, -lldap)
11

SYNOPSIS

13       #include <ldap.h>
14
15       char *ldap_err2string( int err );
16
17       void ldap_perror( LDAP *ld, const char *s )
18
19       int ldap_result2error( LDAP *ld, LDAPMessage *res, int freeit )
20

DESCRIPTION

22       These routines  provide  interpretation  of  the  various  error  codes
23       returned  by  the LDAP protocol and LDAP library routines or associated
24       with an LDAP session.  The error code associated with an  LDAP  session
25       is  accessible using ldap_get_option(3) and ldap_set_option(3) with the
26       LDAP_OPT_RESULT_CODE option (previously called LDAP_OPT_ERROR_NUMBER).
27
28       The ldap_result2error() routine takes res,  a  result  as  produced  by
29       ldap_result(3) or ldap_search_s(3), and returns the corresponding error
30       code.  Possible error codes are listed below.  If the freeit  parameter
31       is  non  zero  it indicates that the res parameter should be freed by a
32       call to ldap_msgfree(3) after the error code has been  extracted.   The
33       ld_errno field in ld is set and returned.
34
35       The  returned  value  can  be passed to ldap_err2string() to get a text
36       description of the message.  The string returned from ldap_err2string()
37       is a pointer to a static area that should not be modified.
38
39       The  ldap_perror()  routine can be called to print an indication of the
40       error on standard error, similar to the way perror(3) works.
41

ERRORS

43       The possible values for an ldap error code are:
44
45       LDAP_SUCCESS        The request was successful.
46
47       LDAP_OPERATIONS_ERROR
48                           An operations error occurred.
49
50       LDAP_PROTOCOL_ERROR A protocol violation was detected.
51
52       LDAP_TIMELIMIT_EXCEEDED
53                           An LDAP time limit was exceeded.
54
55       LDAP_SIZELIMIT_EXCEEDED
56                           An LDAP size limit was exceeded.
57
58       LDAP_COMPARE_FALSE  A compare operation returned false.
59
60       LDAP_COMPARE_TRUE   A compare operation returned true.
61
62       LDAP_STRONG_AUTH_NOT_SUPPORTED
63                           The LDAP server does not support strong authentica‐
64                           tion.
65
66       LDAP_STRONG_AUTH_REQUIRED
67                           Strong  authentication  is  required for the opera‐
68                           tion.
69
70       LDAP_PARTIAL_RESULTS
71                           Partial results only returned.
72
73       LDAP_NO_SUCH_ATTRIBUTE
74                           The attribute type specified does not exist in  the
75                           entry.
76
77       LDAP_UNDEFINED_TYPE The attribute type specified is invalid.
78
79       LDAP_INAPPROPRIATE_MATCHING
80                           Filter   type   not  supported  for  the  specified
81                           attribute.
82
83       LDAP_CONSTRAINT_VIOLATION
84                           An attribute value  specified  violates  some  con‐
85                           straint  (e.g., a postalAddress has too many lines,
86                           or a line that is too long).
87
88       LDAP_TYPE_OR_VALUE_EXISTS
89                           An attribute  type  or  attribute  value  specified
90                           already exists in the entry.
91
92       LDAP_INVALID_SYNTAX An invalid attribute value was specified.
93
94       LDAP_NO_SUCH_OBJECT The  specified  object does not exist in The Direc‐
95                           tory.
96
97       LDAP_ALIAS_PROBLEM  An alias in The Directory points to  a  nonexistent
98                           entry.
99
100       LDAP_INVALID_DN_SYNTAX
101                           A syntactically invalid DN was specified.
102
103       LDAP_IS_LEAF        The object specified is a leaf.
104
105       LDAP_ALIAS_DEREF_PROBLEM
106                           A  problem  was  encountered  when dereferencing an
107                           alias.
108
109       LDAP_INAPPROPRIATE_AUTH
110                           Inappropriate authentication was  specified  (e.g.,
111                           LDAP_AUTH_SIMPLE  was  specified and the entry does
112                           not have a userPassword attribute).
113
114       LDAP_INVALID_CREDENTIALS
115                           Invalid credentials were presented (e.g., the wrong
116                           password).
117
118       LDAP_INSUFFICIENT_ACCESS
119                           The  user  has  insufficient  access to perform the
120                           operation.
121
122       LDAP_BUSY           The DSA is busy.
123
124       LDAP_UNAVAILABLE    The DSA is unavailable.
125
126       LDAP_UNWILLING_TO_PERFORM
127                           The DSA is unwilling to perform the operation.
128
129       LDAP_LOOP_DETECT    A loop was detected.
130
131       LDAP_NAMING_VIOLATION
132                           A naming violation occurred.
133
134       LDAP_OBJECT_CLASS_VIOLATION
135                           An object class violation occurred (e.g., a  "must"
136                           attribute was missing from the entry).
137
138       LDAP_NOT_ALLOWED_ON_NONLEAF
139                           The operation is not allowed on a nonleaf object.
140
141       LDAP_NOT_ALLOWED_ON_RDN
142                           The operation is not allowed on an RDN.
143
144       LDAP_ALREADY_EXISTS The entry already exists.
145
146       LDAP_NO_OBJECT_CLASS_MODS
147                           Object class modifications are not allowed.
148
149       LDAP_OTHER          An unknown error occurred.
150
151       LDAP_SERVER_DOWN    The LDAP library can't contact the LDAP server.
152
153       LDAP_LOCAL_ERROR    Some  local  error  occurred.   This  is  usually a
154                           failed dynamic memory allocation.
155
156       LDAP_ENCODING_ERROR An error was  encountered  encoding  parameters  to
157                           send to the LDAP server.
158
159       LDAP_DECODING_ERROR An error was encountered decoding a result from the
160                           LDAP server.
161
162       LDAP_TIMEOUT        A  timelimit  was  exceeded  while  waiting  for  a
163                           result.
164
165       LDAP_AUTH_UNKNOWN   The  authentication method specified to ldap_bind()
166                           is not known.
167
168       LDAP_FILTER_ERROR   An invalid filter  was  supplied  to  ldap_search()
169                           (e.g., unbalanced parentheses).
170
171       LDAP_PARAM_ERROR    An ldap routine was called with a bad parameter.
172
173       LDAP_NO_MEMORY      An  memory  allocation  (e.g.,  malloc(3)  or other
174                           dynamic memory allocator) call failed  in  an  ldap
175                           library routine.
176

SEE ALSO

178       ldap(3), perror(3)
179

ACKNOWLEDGEMENTS

181       OpenLDAP   is   developed   and  maintained  by  The  OpenLDAP  Project
182       (http://www.openldap.org/).  OpenLDAP is  derived  from  University  of
183       Michigan LDAP 3.3 Release.
184
185
186
187OpenLDAP 2.3.34                    2007/2/16                     LDAP_ERROR(3)
Impressum