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 ?
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
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
But what string would I use for LDAP_AUTH_KRBV4 as mechanism in ldap_sasl_bind_s ?
Thank you Markus
"Howard Chu" wrote in message news:54F78C0A.3070409@symas.com...
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
Markus Moeller wrote:
But what string would I use for LDAP_AUTH_KRBV4 as mechanism in ldap_sasl_bind_s ?
There is no such string. SASL Binds are part of LDAPv3, and KRBv4 binds are in very antiquated LDAPv2 code only.
Thank you Markus
"Howard Chu" wrote in message news:54F78C0A.3070409@symas.com...
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
--On Thursday, March 05, 2015 1:10 AM +0000 Markus Moeller huaraz@moeller.plus.com wrote:
But what string would I use for LDAP_AUTH_KRBV4 as mechanism in ldap_sasl_bind_s ?
If you have something still using KRBV4, your first task should be retiring whatever that is ASAP.
--Quanah
--
Quanah Gibson-Mount Platform Architect Zimbra, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration
I know it is old. I was just trying to do a 1-2-1 mapping of ldap_bind_s to ldap_sasl_bind_s in an existing tool without rewriting everything or loosing functionality ( although I don't know if anybody used it lately), but it looks it can't be done.
Thank you Markus
"Quanah Gibson-Mount" wrote in message news:73E264D9802DD8C4838E7CBC@[192.168.1.9]...
--On Thursday, March 05, 2015 1:10 AM +0000 Markus Moeller huaraz@moeller.plus.com wrote:
But what string would I use for LDAP_AUTH_KRBV4 as mechanism in ldap_sasl_bind_s ?
If you have something still using KRBV4, your first task should be retiring whatever that is ASAP.
--Quanah
--
Quanah Gibson-Mount Platform Architect Zimbra, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration
openldap-technical@openldap.org