}
- if( strcmp( b->a_dn_at->ad_type->sat_oid,
- SLAPD_OID_DN_SYNTAX ) != 0 )
+ if( !is_at_syntax( b->a_dn_at->ad_type,
+ SLAPD_OID_DN_SYNTAX ) )
{
fprintf( stderr,
"%s: line %d: dnattr \"%s\": "
}
#ifdef SLAPD_SCHEMA_NOT_COMPAT
- if( strcmp( b->a_group_at->ad_type->sat_oid,
- SLAPD_OID_DN_SYNTAX ) != 0 )
+ if( !is_at_syntax( b->a_group_at->ad_type,
+ SLAPD_OID_DN_SYNTAX ) )
{
fprintf( stderr,
"%s: line %d: group \"%s\": inappropriate syntax: %s\n",
#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 )
AttributeType *sub,
AttributeType *super ));
+LIBSLAPD_F (int) is_at_syntax LDAP_P((
+ AttributeType *at,
+ const char *oid ));
+
# define at_canonical_name(at) ((at)->sat_cname)
#else
LIBSLAPD_F (int) at_fake_if_needed LDAP_P(( const char *name ));