}
}
*indexmask = a->ai_indexmask;
+
+#ifdef SLAPD_SCHEMA_COMPAT
if ( strcasecmp( a->ai_type, "default" ) == 0 ) {
*syntaxmask = attr_syntax( type );
} else {
*syntaxmask = a->ai_syntaxmask;
}
+#endif
}
void
for ( i = 0; attrs[i] != NULL; i++ ) {
a = (AttrInfo *) ch_malloc( sizeof(AttrInfo) );
a->ai_type = ch_strdup( attrs[i] );
+#ifdef SLAPD_SCHEMA_COMPAT
a->ai_syntaxmask = attr_syntax( a->ai_type );
+#endif
if ( argc == 1 ) {
a->ai_indexmask = (INDEX_PRESENCE | INDEX_EQUALITY |
INDEX_APPROX | INDEX_SUB);
goto return_results;
}
+#ifdef SLAPD_SCHEMA_COMPAT
if ( value_find( a->a_vals, &ava->ava_value, a->a_syntax, 1 ) == 0 )
send_ldap_result( conn, op, LDAP_COMPARE_TRUE,
NULL, NULL, NULL, NULL );
else
+#endif
send_ldap_result( conn, op, LDAP_COMPARE_FALSE,
NULL, NULL, NULL, NULL );
rc = 1;
+#ifdef SLAPD_SCHEMA_COMPAT
+
if ((attr = attr_find(e->e_attrs, "objectclass")) == NULL) {
Debug( LDAP_DEBUG_ACL,
"<= ldbm_back_group: failed to find objectClass\n", 0, 0, 0 );
op_ndn, gr_ndn, groupattrName );
rc = 0;
+#endif
return_results:
if( target != e ) {
return( -1 );
}
+#ifdef SLAPD_SCHEMA_COMPAT
if ( (db = ldbm_cache_open( be, at_cn, LDBM_SUFFIX, mode ))
== NULL ) {
Debug( LDAP_DEBUG_ANY,
}
ldbm_cache_close( be, db );
+#endif
return( 0 );
/* check if the values we're adding already exist */
if ( (a = attr_find( e->e_attrs, mod->mod_type )) != NULL ) {
for ( i = 0; mod->mod_bvalues[i] != NULL; i++ ) {
+#ifdef SLAPD_SCHEMA_COMPAT
if ( value_find( a->a_vals, mod->mod_bvalues[i],
a->a_syntax, 3 ) == 0 ) {
return( LDAP_TYPE_OR_VALUE_EXISTS );
}
+#endif
}
}
for ( i = 0; mod->mod_bvalues[i] != NULL; i++ ) {
found = 0;
for ( j = 0; a->a_vals[j] != NULL; j++ ) {
+#ifdef SLAPD_SCHEMA_COMPAT
if ( value_cmp( mod->mod_bvalues[i], a->a_vals[j],
a->a_syntax, 3 ) != 0 ) {
continue;
}
+#endif
found = 1;
/* found a matching value - delete it */