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

Re: ldap_sasl_bind_s



> You need to set the cred pointer to an empty struct berval instead of
> NULL for an anoynmous bind:
>
> cred.bv_val = NULL;
> cred.bv_len = 0;
> ldap_sasl_bind_s(ldapConn, NULL, LDAP_SASL_SIMPLE, &cred, NULL, NULL,
>     NULL);

Ah, ok. That works. I was confused by this in sasl.c:

113 |   } else if ( cred == NULL || cred->bv_val == NULL ) {
114 |   |   /* SASL bind w/o credentials */
115 |   |   rc = ber_printf( ber, "{it{ist{sN}N}" /*}*/,
116 |   |   |   id, LDAP_REQ_BIND,
117 |   |   |   ld->ld_version, dn, LDAP_AUTH_SASL,
118 |   |   |   mechanism );


But I shouldn't be looking at the lib internals I guess, but the above
isn't doing a LDAP_SASL_SIMPLE then.

Thanks.


-- 
Kind Regards,

Gavin Henry.
Managing Director.

T +44 (0) 1224 279484
M +44 (0) 7930 323266
F +44 (0) 1224 824887
E ghenry@suretecsystems.com

Open Source. Open Solutions(tm).

http://www.suretecsystems.com/

Suretec Systems is a limited company registered in Scotland. Registered
number: SC258005. Registered office: 13 Whiteley Well Place, Inverurie,
Aberdeenshire, AB51 4FP.