mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-26 09:39:45 -05:00
Fix crashes for SASL/EXTERNAL binds:
in slap_sasl_getdn, test id, not dn. dn is still NULL also, don't check for trailing slash in slap_sasl_bind, initialize reslen to 0
This commit is contained in:
parent
6a59465686
commit
bb06fd8d6b
1 changed files with 2 additions and 2 deletions
|
|
@ -112,7 +112,7 @@ int slap_sasl_getdn( Connection *conn, char *id, char **dnptr, int flags )
|
|||
if( flags & FLAG_GETDN_AUTHCID ) {
|
||||
if( sasl_external_x509dn_convert && conn->c_sasl_bind_mech
|
||||
&& ( strcasecmp( "EXTERNAL", conn->c_sasl_bind_mech ) == 0 )
|
||||
&& len && dn[0] == '/' && dn[len-1]== '/' )
|
||||
&& len && id[0] == '/' /* && id[len-1]== '/' */)
|
||||
{
|
||||
/* check SASL external for X.509 style DN and */
|
||||
/* convert to dn:<dn> form */
|
||||
|
|
@ -611,7 +611,7 @@ int slap_sasl_bind(
|
|||
#ifdef HAVE_CYRUS_SASL
|
||||
sasl_conn_t *ctx = conn->c_sasl_context;
|
||||
struct berval response;
|
||||
unsigned reslen;
|
||||
unsigned reslen = 0;
|
||||
const char *errstr;
|
||||
int sc;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue