More updates

This commit is contained in:
Howard Chu 2002-01-13 14:45:29 +00:00
parent 0e847131e0
commit b17f72ef8a
2 changed files with 103 additions and 79 deletions

View File

@ -75,7 +75,9 @@ to step through an entry's attributes, and
to retrieve a given attribute's values. Attribute values to retrieve a given attribute's values. Attribute values
may or may not be displayable. may or may not be displayable.
.SH CONTROLS .SH CONTROLS
LDAP operations can be extended through the use of controls. Controls This library supports both LDAP Version 2 and Version 3, with the Version 2
protocol selected by default.
LDAP Version 3 operations can be extended through the use of controls. Controls
can be sent to a server or returned to the client with any LDAP message. can be sent to a server or returned to the client with any LDAP message.
Extended versions of the standard routines are available for use with Extended versions of the standard routines are available for use with
controls. These routines are generally named by adding controls. These routines are generally named by adding

View File

@ -1,79 +1,65 @@
.TH LDAP_BIND 3 "22 September 1998" "OpenLDAP LDVERSION" .TH LDAP_BIND 3 "13 January 2002" "OpenLDAP LDVERSION"
.\" $OpenLDAP$ .\" $OpenLDAP$
.\" Copyright 1998-2002 The OpenLDAP Foundation All Rights Reserved. .\" Copyright 1998-2002 The OpenLDAP Foundation All Rights Reserved.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE. .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.SH NAME .SH NAME
ldap_bind, ldap_bind_s, ldap_simple_bind, ldap_simple_bind_s, ldap_kerberos_bind_s, ldap_kerberos_bind1, ldap_kerberos_bind1_s, ldap_kerberos_bind2, ldap_kerberos_bind2_s, ldap_unbind, ldap_unbind_s \- LDAP bind routines ldap_bind, ldap_bind_s, ldap_simple_bind, ldap_simple_bind_s, ldap_kerberos_bind_s, ldap_kerberos_bind1, ldap_kerberos_bind1_s, ldap_kerberos_bind2, ldap_kerberos_bind2_s, ldap_sasl_bind, ldap_sasl_bind_s, ldap_sasl_interactive_bind_s, ldap_parse_sasl_bind_result, ldap_unbind, ldap_unbind_s \- LDAP bind routines
.SH SYNOPSIS .SH SYNOPSIS
.nf .nf
.ft B .B #include <ldap.h>
#include <ldap.h>
.LP .LP
.ft B .BI "int ldap_bind(LDAP *" ld ", const char *" who ", const char *" cred ","
int ldap_bind(ld, who, cred, method) .RS
.ft .BI "int " method ");"
LDAP *ld; .RE
char *who, *cred;
int method;
.LP .LP
.ft B .BI "int ldap_bind_s(LDAP *" ld ", const char *" who ", const char *" cred ","
int ldap_bind_s(ld, who, cred, method) .RS
.ft .BI "int " method ");"
LDAP *ld; .RE
char *who, *cred;
int method;
.LP .LP
.ft B .BI "int ldap_simple_bind(LDAP *" ld ", const char *" who ", const char *" passwd ");"
int ldap_simple_bind(ld, who, passwd)
.ft
LDAP *ld;
char *who, *passwd;
.LP .LP
.ft B .BI "int ldap_simple_bind_s(LDAP *" ld ", const char *" who ", const char *" passwd ");"
int ldap_simple_bind_s(ld, who, passwd)
.ft
LDAP *ld;
char *who, *passwd;
.LP .LP
.ft B .BI "int ldap_kerberos_bind_s(LDAP *" ld ", const char *" who ");"
int ldap_kerberos_bind_s(ld, who)
.ft
LDAP *ld;
char *who;
.LP .LP
.ft B .BI "int ldap_kerberos_bind1(LDAP *" ld ", const char *" who ");"
int ldap_kerberos_bind1(ld, who)
.ft
LDAP *ld;
char *who;
.LP .LP
.ft B .BI "int ldap_kerberos_bind1_s(LDAP *" ld ", const char *" who ");"
int ldap_kerberos_bind1_s(ld, who)
.ft
LDAP *ld;
char *who;
.LP .LP
.ft B .BI "int ldap_kerberos_bind2(LDAP *" ld ", const char *" who ");"
int ldap_kerberos_bind2(ld, who)
.ft
LDAP *ld;
char *who;
.LP .LP
.ft B .BI "int ldap_kerberos_bind2_s(LDAP *" ld ", const char *" who ");"
int ldap_kerberos_bind2_s(ld, who)
.ft
LDAP *ld;
char *who;
.LP .LP
.ft B .BI "int ldap_sasl_bind(LDAP *" ld ", const char *" dn ", const char *" mechanism ","
int ldap_unbind(ld) .RS
.ft .BI "struct berval *" cred ", LDAPControl *" sctrls "[],"
LDAP *ld; .BI "LDAPControl *" cctrls "[], int *" msgidp ");"
.RE
.LP .LP
.ft B .BI "int ldap_sasl_bind_s(LDAP *" ld ", const char *" dn ", const char *" mechanism ","
int ldap_unbind_s(ld) .RS
.ft .BI "struct berval *" cred ", LDAPControl *" sctrls "[],"
LDAP *ld; .BI "LDAPControl *" cctrls "[], struct berval **" servercredp ");"
.RE
.LP
.BI "int ldap_parse_sasl_bind_result(LDAP *" ld ", LDAPMessage *" res ","
.RS
.BI "struct berval **" servercredp ", int " freeit ");"
.RE
.LP
.BI "int ldap_sasl_interactive_bind_s(LDAP *" ld ", const char *" dn ","
.RS
.BI "const char *" mechs ", struct berval *" cred ","
.BI "LDAPControl *" sctrls "[], LDAPControl *" cctrls "[],"
.BI "unsigned " flags ", LDAP_SASL_INTERACT_PROC *" interact ","
.BI "void *" defaults ");"
.RE
.LP
.BI "int ldap_unbind(LDAP *" ld ");"
.LP
.BI "int ldap_unbind_s(LDAP *" ld ");"
.\" .LP .\" .LP
.\" .ft B .\" .ft B
.\" void ldap_set_rebind_proc( ld, rebindproc ) .\" void ldap_set_rebind_proc( ld, rebindproc )
@ -83,15 +69,30 @@ LDAP *ld;
.SH DESCRIPTION .SH DESCRIPTION
.LP .LP
These routines provide various interfaces to the LDAP bind operation. These routines provide various interfaces to the LDAP bind operation.
After a connection is made to an LDAP server using After an association with an LDAP server is made using
.BR ldap_open (3), .BR ldap_init (3),
an LDAP bind operation must be performed before other operations can an LDAP bind operation should be performed before other operations are
be attempted over the conection. Both synchronous and asynchronous attempted over the connection. An LDAP bind is required when using
versions of each variant of the bind call are provided. There are Version 2 of the LDAP protocol; it is optional for Version 3 but is
three types of calls, providing simple authentication, kerberos usually needed due to security considerations.
authentication, and general routines to do either one. All routines .LP
There are many types of bind calls, providing simple authentication, Kerberos
version 4 authentication, and general routines to do either one, as
well as calls using
.B SASL
(Simple Authentication and Security Layer)
that can negotiate one of many different kinds of authentication.
Both synchronous and asynchronous versions of each variant of the bind
call are provided. All routines
take \fIld\fP as their first parameter, as returned from take \fIld\fP as their first parameter, as returned from
.BR ldap_open (3). .BR ldap_init (3).
.LP
Kerberos version 4 has been superseded by Kerberos version 5, and the
Kerberos version 4 support is only provided for backward compatibility. The
SASL interfaces should be used for new applications. SASL provides
a general interface for using Kerberos versions 4 and 5 and many other
security systems.
.LP
.SH SIMPLE AUTHENTICATION .SH SIMPLE AUTHENTICATION
The simplest form of the bind call is The simplest form of the bind call is
.BR ldap_simple_bind_s() . .BR ldap_simple_bind_s() .
@ -109,23 +110,38 @@ operation can be obtained by a subsequent call to
.SH KERBEROS AUTHENTICATION .SH KERBEROS AUTHENTICATION
If the LDAP library and LDAP server being contacted have been If the LDAP library and LDAP server being contacted have been
compiled with the KERBEROS option defined, compiled with the KERBEROS option defined,
Kerberos version 4 authentication can be accomplished by calling Kerberos version 4 authentication can be performed. As mentioned above,
the these Kerberos routines are provided only for backward compatibility.
.BR ldap_kerberos_bind_s() .LP
routine. It assumes the user already These routines assume the user already
has obtained a ticket granting ticket. It takes \fIwho\fP, the DN has obtained a ticket granting ticket. The routines take \fIwho\fP, the DN
of the entry to bind as. This routine does both steps of the of the entry to bind as. The
kerberos binding process synchronously. The .B ldap_kerberos_bind_s()
routine does both steps of the Kerberos binding process synchronously. The
.B ldap_kerberos_bind1_s() .B ldap_kerberos_bind1_s()
and and
.B ldap_kerberos_bind2_s() .B ldap_kerberos_bind2_s()
routines allow synchronous access to the routines allow synchronous access to the
individual steps, authenticating to the LDAP server and DSA, respectively. individual steps, authenticating to the LDAP server and X.500 DSA, respectively.
The The
.B ldap_kerberos_bind1() .B ldap_kerberos_bind1()
and and
.B ldap_kerberos_bind2() .B ldap_kerberos_bind2()
routines provide equivalent asynchronous access. routines provide equivalent asynchronous access.
.LP
The
.B ldap_kerberos_bind_s()
routine is used to perform both authentication steps when contacting
an LDAP server that is a gateway to an X.500 DSA. This kind of server
configuration is only supported in the (very old) University of Michigan LDAP
release. The OpenLDAP package no longer provides this gateway server.
The standalone LDAP server provided in OpenLDAP may still be configured
with Kerberos version 4 support, but it only requires one authentication
step, and will return an error if the second step is attempted. Therefore,
only the
.B ldap_kerberos_bind1()
routine or its synchronous equivalent may be used when contacting an
OpenLDAP server.
.SH GENERAL AUTHENTICATION .SH GENERAL AUTHENTICATION
The The
.B ldap_bind() .B ldap_bind()
@ -136,12 +152,14 @@ authentication method to use needs to be selected at runtime. They
both take an extra \fImethod\fP parameter selecting the authentication both take an extra \fImethod\fP parameter selecting the authentication
method to use. It should be set to one of LDAP_AUTH_SIMPLE, method to use. It should be set to one of LDAP_AUTH_SIMPLE,
LDAP_AUTH_KRBV41, or LDAP_AUTH_KRBV42, to select simple authentication, LDAP_AUTH_KRBV41, or LDAP_AUTH_KRBV42, to select simple authentication,
kerberos authentication to the LDAP server, or kerberos authentication Kerberos authentication to the LDAP server, or Kerberos authentication
to the DSA, respectively. to the X.500 DSA, respectively.
.B ldap_bind() .B ldap_bind()
returns the message id of the request it initiates. returns the message id of the request it initiates.
.B ldap_bind_s() .B ldap_bind_s()
returns an LDAP error indication. returns an LDAP error indication.
.SH SASL AUTHENTICATION
Description still under construction...
.SH UNBINDING .SH UNBINDING
The The
.B ldap_unbind() .B ldap_unbind()
@ -195,7 +213,11 @@ for more information.
.SH SEE ALSO .SH SEE ALSO
.BR ldap(3), .BR ldap(3),
.BR ldap_error(3), .BR ldap_error(3),
.BR ldap_open(3) .BR ldap_open(3),
.B RFC 2222
(http://www.ietf.org),
.B Cyrus SASL
(http://asg.web.cmu.edu/sasl/)
.SH ACKNOWLEDGEMENTS .SH ACKNOWLEDGEMENTS
.B OpenLDAP .B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).