-#if defined( LDAP_SLAPI )
- slapi_backend_set_pb( pb, be );
- slapi_connection_set_pb( pb, conn );
- slapi_operation_set_pb( pb, op );
- slapi_pblock_set( pb, SLAPI_BIND_TARGET, (void *)dn.bv_val );
- slapi_pblock_set( pb, SLAPI_BIND_METHOD, (void *)method );
- slapi_pblock_set( pb, SLAPI_MANAGEDSAIT, (void *)(1) );
-
- rc = doPluginFNs( be, SLAPI_PLUGIN_PRE_BIND_FN, pb );
- if ( rc != 0 && rc != LDAP_OTHER ) {
- /*
- * either there is no preOp (bind) plugins
- * or a plugin failed. Just log it
- *
- * FIXME: is this correct?
- */
-#ifdef NEW_LOGGING
- LDAP_LOG( OPERATION, INFO, "do_bind: Bind preOps failed\n",
- 0, 0, 0);
-#else
- Debug(LDAP_DEBUG_TRACE, "do_bind: Bind preOps failed.\n",
- 0, 0, 0);
-#endif
- }
-#endif /* defined( LDAP_SLAPI ) */
-
- if ( be->be_bind ) {
- int ret;
-
- /* deref suffix alias if appropriate */
- suffix_alias( be, &ndn );