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

Re: ldap_sasl_bind_s question



Markus Moeller wrote:
Hi,

   I try to replace deprecated ldap_bind_s with ldap_sasl_bind_s but I
am missing some details about how to do that.  With  ldap_bind_s I have
method as a int and ldap.h has the following defined

/* authentication methods available */
#define LDAP_AUTH_NONE   ((ber_tag_t) 0x00U) /* no authentication */
#define LDAP_AUTH_SIMPLE ((ber_tag_t) 0x80U) /* context specific +
primitive */
#define LDAP_AUTH_SASL   ((ber_tag_t) 0xa3U) /* context specific +
constructed */
#define LDAP_AUTH_KRBV4  ((ber_tag_t) 0xffU) /* means do both of the
following */
#define LDAP_AUTH_KRBV41 ((ber_tag_t) 0x81U) /* context specific +
primitive */
#define LDAP_AUTH_KRBV42 ((ber_tag_t) 0x82U) /* context specific +
primitive */

but in ldap_sasl_bind_s it is a char variable and I do not know what the
value would be for the above auth methods.  Where can I find them
documented ?

LDAP_SASL_SIMPLE is in ldap.h, right next to the definitions you quoted above.
int ldap_sasl_bind_s(LDAP *ld, const char *dn, const char *mechanism,
       struct berval *cred, LDAPControl *sctrls[],
       LDAPControl *cctrls[], struct berval **servercredp);

Thank you
Markus





--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/