Back to index

openldap  2.4.31
Functions
bind.c File Reference
#include "portable.h"
#include <stdio.h>
#include <ac/stdlib.h>
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/time.h>
#include "ldap-int.h"
#include "ldap_log.h"

Go to the source code of this file.

Functions

int ldap_bind (LDAP *ld, LDAP_CONST char *dn, LDAP_CONST char *passwd, int authmethod)
int ldap_bind_s (LDAP *ld, LDAP_CONST char *dn, LDAP_CONST char *passwd, int authmethod)

Function Documentation

int ldap_bind ( LDAP *  ld,
LDAP_CONST char *  dn,
LDAP_CONST char *  passwd,
int  authmethod 
)

Definition at line 66 of file bind.c.

{
       Debug( LDAP_DEBUG_TRACE, "ldap_bind\n", 0, 0, 0 );

       switch ( authmethod ) {
       case LDAP_AUTH_SIMPLE:
              return( ldap_simple_bind( ld, dn, passwd ) );

#ifdef HAVE_GSSAPI
       case LDAP_AUTH_NEGOTIATE:
              return( ldap_gssapi_bind_s( ld, dn, passwd) );
#endif

       case LDAP_AUTH_SASL:
              /* user must use ldap_sasl_bind */
              /* FALL-THRU */

       default:
              ld->ld_errno = LDAP_AUTH_UNKNOWN;
              return( -1 );
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

int ldap_bind_s ( LDAP *  ld,
LDAP_CONST char *  dn,
LDAP_CONST char *  passwd,
int  authmethod 
)

Definition at line 103 of file bind.c.

{
       Debug( LDAP_DEBUG_TRACE, "ldap_bind_s\n", 0, 0, 0 );

       switch ( authmethod ) {
       case LDAP_AUTH_SIMPLE:
              return( ldap_simple_bind_s( ld, dn, passwd ) );

#ifdef HAVE_GSSAPI
       case LDAP_AUTH_NEGOTIATE:
              return( ldap_gssapi_bind_s( ld, dn, passwd) );
#endif

       case LDAP_AUTH_SASL:
              /* user must use ldap_sasl_bind */
              /* FALL-THRU */

       default:
              return( ld->ld_errno = LDAP_AUTH_UNKNOWN );
       }
}

Here is the call graph for this function:

Here is the caller graph for this function: