X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fschema_check.c;h=bf6b75a8ca21f9382b4818df1bcbe3bb840a2035;hb=2bfe79fe884565801600e309d1fcbefa41fb0f4b;hp=1d47ff4365ecb1f3f5ef508518fc089e9e42a973;hpb=feeeabcd682e39d0c871e9ee1821e0a1ee99c3d0;p=openldap diff --git a/servers/slapd/schema_check.c b/servers/slapd/schema_check.c index 1d47ff4365..bf6b75a8ca 100644 --- a/servers/slapd/schema_check.c +++ b/servers/slapd/schema_check.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2005 The OpenLDAP Foundation. + * Copyright 1998-2006 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,7 +43,7 @@ static int entry_naming_check( int entry_schema_check( - Backend *be, + Operation *op, Entry *e, Attribute *oldattrs, int manage, @@ -64,7 +64,11 @@ entry_schema_check( 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; } @@ -79,12 +83,12 @@ entry_schema_check( const char *type = a->a_desc->ad_cname.bv_val; /* there should be at least one value */ - assert( a->a_vals ); + assert( a->a_vals != NULL ); assert( a->a_vals[0].bv_val != NULL ); 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; } @@ -308,7 +312,7 @@ entry_schema_check( } 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;