From d06d4d33a8e8bc9c0c7e5696e54660aea0dcd16a Mon Sep 17 00:00:00 2001 From: Jong Hyuk Choi Date: Wed, 3 Sep 2003 15:44:22 +0000 Subject: [PATCH] no schema checking patch for proxy cache (apurva) --- servers/slapd/back-meta/cache-config.c | 1 + servers/slapd/schema_check.c | 4 ++++ servers/slapd/slap.h | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/servers/slapd/back-meta/cache-config.c b/servers/slapd/back-meta/cache-config.c index b14e28a3e0..a7bc35d9cc 100644 --- a/servers/slapd/back-meta/cache-config.c +++ b/servers/slapd/back-meta/cache-config.c @@ -112,6 +112,7 @@ meta_back_cache_config( cache_suffix = be->be_nsuffix[0]; } li->glue_be = select_backend( &cache_suffix, 0, 1 ); + li->glue_be->be_flags |= SLAP_BFLAG_NO_SCHEMA_CHECK; if ( cache_suffix.bv_val != be->be_nsuffix[0].bv_val ) { ch_free( cache_suffix.bv_val ); } diff --git a/servers/slapd/schema_check.c b/servers/slapd/schema_check.c index 2aeafa3abd..c15d78eb37 100644 --- a/servers/slapd/schema_check.c +++ b/servers/slapd/schema_check.c @@ -56,6 +56,10 @@ entry_schema_check( int subentry = is_entry_subentry( e ); int collectiveSubentry = 0; + if ( SLAP_NO_SCHEMA_CHECK( be )) { + return LDAP_SUCCESS; + } + if( subentry ) { collectiveSubentry = is_entry_collectiveAttributeSubentry( e ); } diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index 2e86932c6f..c62d40d993 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -1395,7 +1395,7 @@ struct slap_backend_db { #define SLAP_BFLAG_DYNAMIC 0x8000U slap_mask_t be_flags; #define SLAP_LASTMOD(be) (!((be)->be_flags & SLAP_BFLAG_NOLASTMOD)) -#define SLAP_NO_SCHEMA_CHECK (!((be)->be_flags & SLAP_BFLAG_NO_SCHEMA_CHECK)) +#define SLAP_NO_SCHEMA_CHECK(be) (((be)->be_flags & SLAP_BFLAG_NO_SCHEMA_CHECK)) #define SLAP_GLUE_INSTANCE(be) ((be)->be_flags & SLAP_BFLAG_GLUE_INSTANCE) #define SLAP_GLUE_SUBORDINATE(be) \ ((be)->be_flags & SLAP_BFLAG_GLUE_SUBORDINATE) -- 2.39.5