ctrls[num_ctrls] = 0;
/* check entry's schema */
- rs->sr_err = entry_schema_check( op->o_bd, op->oq_add.rs_e, NULL,
+ rs->sr_err = entry_schema_check( op, op->oq_add.rs_e, NULL,
get_manageDIT(op), &rs->sr_text, textbuf, textlen );
if ( rs->sr_err != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE,
}
/* check that the entry still obeys the schema */
- rc = entry_schema_check( op->o_bd, e, save_attrs, get_manageDIT(op),
+ rc = entry_schema_check( op, e, save_attrs, get_manageDIT(op),
text, textbuf, textlen );
if ( rc != LDAP_SUCCESS || op->o_noop ) {
attrs_free( e->e_attrs );
Debug(LDAP_DEBUG_ARGS, "==> ldbm_back_add: %s\n",
op->o_req_dn.bv_val, 0, 0);
- rs->sr_err = entry_schema_check( op->o_bd, op->oq_add.rs_e, NULL,
+ rs->sr_err = entry_schema_check( op, op->oq_add.rs_e, NULL,
get_manageDIT(op), &rs->sr_text, textbuf, textlen );
if ( rs->sr_err != LDAP_SUCCESS ) {
}
/* check that the entry still obeys the schema */
- rc = entry_schema_check( op->o_bd, e, save_attrs, get_manageDIT(op),
+ rc = entry_schema_check( op, e, save_attrs, get_manageDIT(op),
text, textbuf, textlen );
if ( rc != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_ANY, "entry failed schema check: %s\n",
}
/* check that the entry still obeys the schema */
- rc = entry_schema_check( be_monitor, e, save_attrs, 0,
+ rc = entry_schema_check( op, e, save_attrs, 0,
&text, textbuf, sizeof( textbuf ) );
if ( rc != LDAP_SUCCESS ) {
rs->sr_err = rc;
if ( BACKSQL_CHECK_SCHEMA( bi ) ) {
char textbuf[ SLAP_TEXT_BUFLEN ] = { '\0' };
- rs->sr_err = entry_schema_check( op->o_bd, op->ora_e, NULL, 0,
+ rs->sr_err = entry_schema_check( op, op->ora_e, NULL, 0,
&rs->sr_text, textbuf, sizeof( textbuf ) );
if ( rs->sr_err != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE, " backsql_add(\"%s\"): "
goto do_transact;
}
- rs->sr_err = entry_schema_check( op->o_bd, &m, NULL, 0,
+ rs->sr_err = entry_schema_check( op, &m, NULL, 0,
&rs->sr_text, textbuf, sizeof( textbuf ) );
if ( rs->sr_err != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE, " backsql_add(\"%s\"): "
e_id = bsi.bsi_base_id;
- rs->sr_err = entry_schema_check( op->o_bd, &r, NULL, 0,
+ rs->sr_err = entry_schema_check( op, &r, NULL, 0,
&rs->sr_text, textbuf, sizeof( textbuf ) );
if ( rs->sr_err != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE, " backsql_add(\"%s\"): "
if(rc == LDAP_SUCCESS) {
/* check that the entry still obeys the schema */
- rc = entry_schema_check(op->o_bd, e, NULL, 0,
+ rc = entry_schema_check(op, e, NULL, 0,
&rs->sr_text, ca->msg, sizeof(ca->msg) );
}
if ( rc == LDAP_SUCCESS ) {
char *textbuf, size_t textlen );
LDAP_SLAPD_F( int ) entry_schema_check(
- Backend *be,
+ Operation *op,
Entry *e,
Attribute *attrs,
int manage,
int
entry_schema_check(
- Backend *be,
+ Operation *op,
Entry *e,
Attribute *oldattrs,
int manage,
int subentry = is_entry_subentry( e );
int collectiveSubentry = 0;
- if ( SLAP_NO_SCHEMA_CHECK( be )) {
+ if ( SLAP_NO_SCHEMA_CHECK( op->o_bd )) {
+ return LDAP_SUCCESS;
+ }
+
+ if ( get_no_schema_check( op ) ) {
return LDAP_SUCCESS;
}
if( a->a_desc->ad_type->sat_check ) {
int rc = (a->a_desc->ad_type->sat_check)(
- be, e, a, text, textbuf, textlen );
+ op->o_bd, e, a, text, textbuf, textlen );
if( rc != LDAP_SUCCESS ) {
return rc;
}
}
if ( oc->soc_check ) {
- int rc = (oc->soc_check)( be, e, oc,
+ int rc = (oc->soc_check)( op->o_bd, e, oc,
text, textbuf, textlen );
if( rc != LDAP_SUCCESS ) {
return rc;
char o_nocaching;
char o_delete_glue_parent;
+ char o_no_schema_check;
+#define get_no_schema_check(op) ((op)->o_no_schema_check)
#define SLAP_CONTROL_NONE 0
#define SLAP_CONTROL_IGNORED 1
int ret;
struct berval bvtext;
int checkvals;
+ char opbuf[OPERATION_BUFFER_SIZE];
+ Operation *op;
+
slap_tool_init( progname, SLAPADD, argc, argv );
+ memset( opbuf, 0, sizeof(opbuf) );
+ op = (Operation *)opbuf;
+
if( !be->be_entry_open ||
!be->be_entry_close ||
!be->be_entry_put )
}
/* check schema */
- rc = entry_schema_check( be, e, NULL, manage,
+ op->o_bd = be;
+
+ rc = entry_schema_check( op, e, NULL, manage,
&text, textbuf, textlen );
if( rc != LDAP_SUCCESS ) {
/* slapi_utils.c */
LDAP_SLAPI_F (LDAPMod **) slapi_int_modifications2ldapmods LDAP_P(( Modifications **, void *ctx ));
-LDAP_SLAPI_F (Modifications *) slapi_int_ldapmods2modifications LDAP_P(( LDAPMod **, int dup, void *ctx ));
+LDAP_SLAPI_F (Modifications *) slapi_int_ldapmods2modifications LDAP_P(( LDAPMod **, void *ctx ));
LDAP_SLAPI_F (void) slapi_int_free_ldapmods LDAP_P(( LDAPMod ** ));
LDAP_SLAPI_F (int) slapi_int_count_controls LDAP_P(( LDAPControl **ctrls ));
LDAP_SLAPI_F (char **) slapi_get_supported_extended_ops LDAP_P((void));
/* slapi_pblock.c */
LDAP_SLAPI_F (int) slapi_pblock_delete_param LDAP_P(( Slapi_PBlock *p, int param ));
LDAP_SLAPI_F (void) slapi_pblock_clear LDAP_P(( Slapi_PBlock *pb ));
-LDAP_SLAPI_F (void) slapi_int_mods_free( Modifications *ml );
LDAP_SLAPI_F (int) slapi_int_pblock_get_first LDAP_P(( Backend *be, Slapi_PBlock **pb ));
LDAP_SLAPI_F (int) slapi_int_pblock_get_next LDAP_P(( Slapi_PBlock **pb ));
LDAP_SLAPI_F (int) slapi_int_clear_object_extensions LDAP_P((int objecttype, void *object));
/* slapi_overlay.c */
-LDAP_SLAPI_F (int) slapi_int_overlay_init LDAP_P((void));
+LDAP_SLAPI_F (int) slapi_over_is_inst LDAP_P((BackendDB *));
+LDAP_SLAPI_F (int) slapi_over_config LDAP_P((BackendDB *));
LDAP_END_DECL