From: Kurt Zeilenga Date: Sat, 30 Mar 2002 01:07:20 +0000 (+0000) Subject: add si_syn_octetString to keep syntax load checks in one place. X-Git-Tag: OPENLDAP_REL_ENG_2_MP~285 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e7523b1496b89413a61f8a4ac9ec879c1647e265;p=openldap add si_syn_octetString to keep syntax load checks in one place. --- diff --git a/servers/slapd/schema_prep.c b/servers/slapd/schema_prep.c index 65e0f3db62..7893b884af 100644 --- a/servers/slapd/schema_prep.c +++ b/servers/slapd/schema_prep.c @@ -583,6 +583,8 @@ static struct slap_schema_syn_map { char *sssm_name; size_t sssm_offset; } syn_map[] = { + { "1.3.6.1.4.1.1466.115.121.1.40", + offsetof(struct slap_internal_schema, si_syn_octetString) }, { "1.3.6.1.4.1.1466.115.121.1.12", offsetof(struct slap_internal_schema, si_syn_distinguishedName) }, { "1.3.6.1.4.1.1466.115.121.1.27", @@ -703,12 +705,7 @@ slap_schema_check( void ) } } - slap_at_undefined.sat_syntax = syn_find( SLAPD_OCTETSTRING_SYNTAX ); - if( slap_at_undefined.sat_syntax == NULL ) { - fprintf( stderr, "slap_schema_check: " - "No octetString syntax \"" SLAPD_OCTETSTRING_SYNTAX "\"\n" ); - return LDAP_INVALID_SYNTAX; - } + slap_at_undefined.sat_syntax = slap_schema.si_syn_distinguishedName; slap_schema.si_at_undefined = &slap_at_undefined; for( i=0; ad_map[i].ssam_name; i++ ) { diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index 3f8da8c81d..146626b628 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -636,6 +636,7 @@ struct slap_internal_schema { MatchingRule *si_mr_integerMatch; /* Syntaxes */ + Syntax *si_syn_octetString; Syntax *si_syn_distinguishedName; Syntax *si_syn_integer; };