#define SYNTAX_DSCE_OID "2.5.13.5"
#define SYNTAX_IA5_OID "1.3.6.1.4.1.1466.115.121.1.26"
#define SYNTAX_IA5CE_OID "1.3.6.1.4.1.1466.109.114.1"
-#define SYNTAX_DN_OID SLAPD_OID_DN_SYNTAX
+#define SYNTAX_DN_OID "1.3.6.1.4.1.1466.115.121.1.12"
#define SYNTAX_TEL_OID "1.3.6.1.4.1.1466.115.121.1.50"
#define SYNTAX_BIN_OID "1.3.6.1.4.1.1466.115.121.1.40" /* octetString */
#endif
+int is_at_syntax(
+ AttributeType *at,
+ const char *oid )
+{
+ for( ; at != NULL; at = at->sat_sup ) {
+ if( at->sat_syntax_oid ) {
+ return ( strcmp( at->sat_syntax_oid, oid ) == 0 );
+ }
+ }
+
+ return 0;
+}
+
int is_at_subtype(
AttributeType *sub,
AttributeType *sup )
static int
attr_index_name_cmp(
- char *type,
+ const char *type,
struct aindexrec *air
)
{
struct berval *vals[2];
AttributeType *at;
+#ifdef SLAPD_SCHEMA_NOT_COMPAT
+ AttributeDescription *ad_attributeTypes = slap_schema.si_ad_attributeTypes;
+#else
+ char *ad_attributeTypes = "attributeTypes";
+#endif
+
vals[0] = &val;
vals[1] = NULL;
for ( at = attr_list; at; at = at->sat_next ) {
val.bv_val = ldap_attributetype2str( &at->sat_atype );
- if ( val.bv_val ) {
- val.bv_len = strlen( val.bv_val );
- Debug( LDAP_DEBUG_TRACE, "Merging at [%ld] %s\n",
- (long) val.bv_len, val.bv_val, 0 );
- attr_merge( e, "attributeTypes", vals );
- ldap_memfree( val.bv_val );
- } else {
+ if ( val.bv_val == NULL ) {
return -1;
}
+ val.bv_len = strlen( val.bv_val );
+#if 0
+ Debug( LDAP_DEBUG_TRACE, "Merging at [%ld] %s\n",
+ (long) val.bv_len, val.bv_val, 0 );
+#endif
+ attr_merge( e, ad_attributeTypes, vals );
+ ldap_memfree( val.bv_val );
}
return 0;
}