From: Kurt Zeilenga Date: Mon, 16 Oct 2000 23:47:46 +0000 (+0000) Subject: Trim unimplemented syntaxes and matching rules from subschema subentry X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1728 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d30264a2a1c51c2e8802c9f57c70664846526f8b;p=openldap Trim unimplemented syntaxes and matching rules from subschema subentry --- diff --git a/servers/slapd/mr.c b/servers/slapd/mr.c index 7648fb6ac7..705c2b7aa6 100644 --- a/servers/slapd/mr.c +++ b/servers/slapd/mr.c @@ -226,6 +226,11 @@ int mr_schema_info( Entry *e ) vals[1] = NULL; for ( mr = mr_list; mr; mr = mr->smr_next ) { + if ( ! mr->smr_match ) { + /* skip rules without matching functions */ + continue; + } + val.bv_val = ldap_matchingrule2str( &mr->smr_mrule ); if ( val.bv_val == NULL ) { diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c index 95fc97851d..c4e6fa3c52 100644 --- a/servers/slapd/schema_init.c +++ b/servers/slapd/schema_init.c @@ -3662,7 +3662,6 @@ struct syntax_defs_rec { #endif }; -#define X_HIDE "X-HIDE 'TRUE' " #define X_BINARY "X-BINARY-TRANSFER-REQUIRED 'TRUE' " #define X_NOT_H_R "X-NOT-HUMAN-READABLE 'TRUE' " @@ -3792,7 +3791,7 @@ struct syntax_defs_rec syntax_defs[] = { 0, NULL, NULL, NULL}, /* OpenLDAP Void Syntax */ - {"( 1.3.6.1.4.1.4203.1.1.1 DESC 'OpenLDAP void' " X_HIDE ")" , + {"( 1.3.6.1.4.1.4203.1.1.1 DESC 'OpenLDAP void' )" , SLAP_SYNTAX_HIDE, inValidate, NULL, NULL}, {NULL, 0, NULL, NULL, NULL} }; diff --git a/servers/slapd/syntax.c b/servers/slapd/syntax.c index 9b9e01c809..9a3c0b21f3 100644 --- a/servers/slapd/syntax.c +++ b/servers/slapd/syntax.c @@ -183,6 +183,15 @@ syn_schema_info( Entry *e ) vals[1] = NULL; for ( syn = syn_list; syn; syn = syn->ssyn_next ) { + if ( ! syn->ssyn_validate ) { + /* skip syntaxes without validators */ + continue; + } + if ( syn->ssyn_flags & SLAP_SYNTAX_HIDE ) { + /* hide syntaxes */ + continue; + } + val.bv_val = ldap_syntax2str( &syn->ssyn_syn ); if ( val.bv_val == NULL ) { return -1;