Seth Woolley's Man Viewer

ldap_err2string(3) - ld_errno, ldap_err2string, ldap_errlist, ldap_perror, ldap_result2error - LDAP protocol error handling routines - man 3 ldap_err2string

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

LDAP_ERROR(3)                                                    LDAP_ERROR(3)



NAME
       ldap_perror, ld_errno, ldap_result2error, ldap_errlist, ldap_err2string
       - LDAP protocol error(8,n) handling routines

LIBRARY
       OpenLDAP LDAP (libldap, -lldap)

SYNOPSIS
       #include <ldap.h>

       char *ldap_err2string( int err );

       void ldap_perror( LDAP *ld(1,8), const char *s )

       int ldap_result2error( LDAP *ld(1,8), LDAPMessage *res, int freeit )

DESCRIPTION
       These routines  provide  interpretation  of  the  various  error(8,n)  codes
       returned  by  the LDAP protocol and LDAP library routines or associated
       with an LDAP session.  The error(8,n) code associated with an  LDAP  session
       is  accessible using ldap_get_option(3) and ldap_set_option(3) with the
       LDAP_OPT_RESULT_CODE option (previously called  LDAP_OPT_ERROR_NUMBER).

       The  ldap_result2error()  routine  takes  res,  a result as produced by
       ldap_result(3) or ldap_search_s(3), and returns the corresponding error(8,n)
       code.   Possible error(8,n) codes are listed below.  If the freeit parameter
       is non zero it indicates that the res parameter should be  freed  by  a
       call  to  ldap_msgfree(3) after the error(8,n) code has been extracted.  The
       ld_errno field in(1,8) ld(1,8) is set(7,n,1 builtins) and returned.

       The returned value can be passed to ldap_err2string()  to  get  a  text
       description of the message.  The string(3,n) returned from ldap_err2string()
       is a pointer to a static area that should not be modified.

       The ldap_perror() routine can be called to print an indication  of  the
       error(8,n) on standard error(8,n), similar to the way perror(1,3)(3) works.

ERRORS
       The possible values for an ldap(3,5,n) error(8,n) code are:


       LDAP_SUCCESS        The request was successful.

       LDAP_OPERATIONS_ERROR
                           An operations error(8,n) occurred.

       LDAP_PROTOCOL_ERROR A protocol violation was detected.

       LDAP_TIMELIMIT_EXCEEDED
                           An LDAP time(1,2,n) limit was exceeded.

       LDAP_SIZELIMIT_EXCEEDED
                           An LDAP size limit was exceeded.

       LDAP_COMPARE_FALSE  A compare operation returned false.

       LDAP_COMPARE_TRUE   A compare operation returned true.

       LDAP_STRONG_AUTH_NOT_SUPPORTED
                           The LDAP server does not support strong authentica-
                           tion.

       LDAP_STRONG_AUTH_REQUIRED
                           Strong authentication is required  for  the  opera-
                           tion.

       LDAP_PARTIAL_RESULTS
                           Partial results only returned.

       LDAP_NO_SUCH_ATTRIBUTE
                           The  attribute type specified does not exist in(1,8) the
                           entry.

       LDAP_UNDEFINED_TYPE The attribute type specified is invalid.

       LDAP_INAPPROPRIATE_MATCHING
                           Filter  type  not  supported  for   the   specified
                           attribute.

       LDAP_CONSTRAINT_VIOLATION
                           An  attribute  value  specified  violates some con-
                           straint (e.g., a postalAddress has too many  lines,
                           or a line that is too long).

       LDAP_TYPE_OR_VALUE_EXISTS
                           An  attribute  type  or  attribute  value specified
                           already exists in(1,8) the entry.

       LDAP_INVALID_SYNTAX An invalid attribute value was specified.

       LDAP_NO_SUCH_OBJECT The specified object does not exist in(1,8)  The  Direc-
                           tory.

       LDAP_ALIAS_PROBLEM  An  alias  in(1,8) The Directory points to a nonexistent
                           entry.

       LDAP_INVALID_DN_SYNTAX
                           A syntactically invalid DN was specified.

       LDAP_IS_LEAF        The object specified is a leaf.

       LDAP_ALIAS_DEREF_PROBLEM
                           A problem was  encountered  when  dereferencing  an
                           alias.

       LDAP_INAPPROPRIATE_AUTH
                           Inappropriate  authentication  was specified (e.g.,
                           LDAP_AUTH_SIMPLE was specified and the  entry  does
                           not have a userPassword attribute).

       LDAP_INVALID_CREDENTIALS
                           Invalid credentials were presented (e.g., the wrong
                           password).

       LDAP_INSUFFICIENT_ACCESS
                           The user has insufficient  access(2,5)  to  perform  the
                           operation.

       LDAP_BUSY           The DSA is busy.

       LDAP_UNAVAILABLE    The DSA is unavailable.

       LDAP_UNWILLING_TO_PERFORM
                           The DSA is unwilling to perform the operation.

       LDAP_LOOP_DETECT    A loop was detected.

       LDAP_NAMING_VIOLATION
                           A naming violation occurred.

       LDAP_OBJECT_CLASS_VIOLATION
                           An  object class violation occurred (e.g., a "must"
                           attribute was missing from the entry).

       LDAP_NOT_ALLOWED_ON_NONLEAF
                           The operation is not allowed on a nonleaf object.

       LDAP_NOT_ALLOWED_ON_RDN
                           The operation is not allowed on an RDN.

       LDAP_ALREADY_EXISTS The entry already exists.

       LDAP_NO_OBJECT_CLASS_MODS
                           Object class modifications are not allowed.

       LDAP_OTHER          An unknown error(8,n) occurred.

       LDAP_SERVER_DOWN    The LDAP library can't contact the LDAP server.

       LDAP_LOCAL_ERROR    Some local  error(8,n)  occurred.   This  is  usually  a
                           failed dynamic memory allocation.

       LDAP_ENCODING_ERROR An  error(8,n)  was  encountered  encoding(3,n) parameters to
                           send(2,n) to the LDAP server.

       LDAP_DECODING_ERROR An error(8,n) was encountered decoding a result from the
                           LDAP server.

       LDAP_TIMEOUT        A  timelimit  was  exceeded  while  waiting  for  a
                           result.

       LDAP_AUTH_UNKNOWN   The authentication method specified to  ldap_bind()
                           is not known.

       LDAP_FILTER_ERROR   An  invalid  filter(1,3x,3x curs_util)  was  supplied to ldap_search()
                           (e.g., unbalanced parentheses).

       LDAP_PARAM_ERROR    An ldap(3,5,n) routine was called with a bad parameter.

       LDAP_NO_MEMORY      An memory  allocation  (e.g.,  malloc(3)  or  other
                           dynamic  memory  allocator)  call failed in(1,8) an ldap(3,5,n)
                           library routine.

SEE ALSO
       ldap(3,5,n)(3), perror(1,3)(3)

ACKNOWLEDGEMENTS
       OpenLDAP  is  developed  and  maintained  by   The   OpenLDAP   Project
       (http://www.openldap.org/).   OpenLDAP  is  derived  from University of
       Michigan LDAP 3.3 Release.



OpenLDAP 2.2.15                   2004/07/27                     LDAP_ERROR(3)

References for this manual (incoming links)