for compat with 2.2 plugins
Add a couple of backend SLAPI APIs
break;
case SLAPI_BACKEND:
PBLOCK_ASSERT_OP( pb, 0 );
- *((BackendDB **)value) = pb->pb_op->o_bd;
+ *((BackendDB **)value) = select_backend( &pb->pb_op->o_req_ndn, 0, 0 );
break;
case SLAPI_BE_TYPE:
PBLOCK_ASSERT_OP( pb, 0 );
return type;
}
+void slapi_be_set_readonly( Slapi_Backend *be, int readonly )
+{
+ if ( be == NULL )
+ return;
+
+ if ( readonly )
+ be->be_restrictops |= SLAP_RESTRICT_OP_WRITES;
+ else
+ be->be_restrictops &= ~(SLAP_RESTRICT_OP_WRITES);
+}
+
+int slapi_be_get_readonly( Slapi_Backend *be )
+{
+ if ( be == NULL )
+ return 0;
+
+ return ( (be->be_restrictops & SLAP_RESTRICT_OP_WRITES) == SLAP_RESTRICT_OP_WRITES );
+}
+
+const char *slapi_x_be_get_updatedn( Slapi_Backend *be )
+{
+ if ( be == NULL )
+ return NULL;
+
+ return be->be_update_ndn.bv_val;
+}
+
#if 0
void
slapi_operation_set_flag(Slapi_Operation *op, unsigned long flag)