From e7523b1496b89413a61f8a4ac9ec879c1647e265 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 30 Mar 2002 01:07:20 +0000 Subject: [PATCH] add si_syn_octetString to keep syntax load checks in one place. --- servers/slapd/schema_prep.c | 9 +++------ servers/slapd/slap.h | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) 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; }; -- 2.39.5