- if ( method == LDAP_AUTH_SIMPLE ) {
- if ( be_isroot_pw( be, conn, dn, cred ) ) {
- ber_dupbv( edn, be_root_dn( be ) );
- rc = 0; /* front end will send result */
-
- } else if ( refs != NULL ) {
- send_ldap_result( conn, op, LDAP_REFERRAL,
- matched_dn, NULL, refs, NULL );
-
- } else {
- send_ldap_result( conn, op, LDAP_INVALID_CREDENTIALS,
- NULL, NULL, NULL, NULL );
- }
-
- } else if ( refs != NULL ) {
- send_ldap_result( conn, op, LDAP_REFERRAL,
- matched_dn, NULL, refs, NULL );
-
- } else {
- send_ldap_result( conn, op, LDAP_INVALID_CREDENTIALS,
- NULL, NULL, NULL, NULL );
- }
-
- if ( refs ) ber_bvarray_free( refs );
- if ( matched_dn ) free( matched_dn );
- return( rc );