mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
o_dn/o_ndn must not be NULL. Set to "" upon receiving bind request.
This commit is contained in:
parent
106eef41d8
commit
49f39bc4cf
@ -87,21 +87,33 @@ ldbm_back_bind(
|
|||||||
/* get entry with reader lock */
|
/* get entry with reader lock */
|
||||||
if ( (e = dn2entry_r( be, dn, &matched )) == NULL ) {
|
if ( (e = dn2entry_r( be, dn, &matched )) == NULL ) {
|
||||||
/* allow noauth binds */
|
/* allow noauth binds */
|
||||||
if ( method == LDAP_AUTH_SIMPLE && cred->bv_len == 0 ) {
|
rc = 1;
|
||||||
/*
|
if ( method == LDAP_AUTH_SIMPLE ) {
|
||||||
* bind successful, but return 1 so we don't
|
if( cred->bv_len == 0 ) {
|
||||||
* authorize based on noauth credentials
|
/* SUCCESS */
|
||||||
*/
|
send_ldap_result( conn, op, LDAP_SUCCESS, NULL, NULL );
|
||||||
send_ldap_result( conn, op, LDAP_SUCCESS, NULL, NULL );
|
|
||||||
rc = 1;
|
} else if ( be_isroot_pw( be, dn, cred ) ) {
|
||||||
} else if ( be_isroot_pw( be, dn, cred ) ) {
|
*edn = ch_strdup( be_root_dn( be ) );
|
||||||
/* front end will send result */
|
rc = 0; /* front end will send result */
|
||||||
*edn = ch_strdup( be_root_dn( be ) );
|
|
||||||
rc = 0;
|
} else {
|
||||||
|
send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT, matched, NULL );
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if ( method == LDAP_AUTH_SASL ) {
|
||||||
|
if( mech != NULL && strcasecmp(mech,"DIGEST-MD5") ) {
|
||||||
|
/* insert DIGEST calls here */
|
||||||
|
send_ldap_result( conn, op, LDAP_INAPPROPRIATE_AUTH, NULL, NULL );
|
||||||
|
|
||||||
|
} else {
|
||||||
|
send_ldap_result( conn, op, LDAP_INAPPROPRIATE_AUTH, NULL, NULL );
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT, matched, NULL );
|
send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT, matched, NULL );
|
||||||
rc = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( matched != NULL ) {
|
if ( matched != NULL ) {
|
||||||
free( matched );
|
free( matched );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user