]> git.sur5r.net Git - openldap/commitdiff
Trim unimplemented syntaxes and matching rules from subschema subentry
authorKurt Zeilenga <kurt@openldap.org>
Mon, 16 Oct 2000 23:47:46 +0000 (23:47 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 16 Oct 2000 23:47:46 +0000 (23:47 +0000)
servers/slapd/mr.c
servers/slapd/schema_init.c
servers/slapd/syntax.c

index 7648fb6ac7cf0bde5893e11f3e16af8c5c91b946..705c2b7aa64c4ee1b8972de9b59e9e935b95911f 100644 (file)
@@ -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 ) {
index 95fc97851d79614d073ee5136523afd25e97c562..c4e6fa3c52940ae593f567b3020a4ceb1e22780b 100644 (file)
@@ -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}
 };
index 9b9e01c809e3ccde6a8e7f2f2e924fde75e78de0..9a3c0b21f339bcc47fe18e415bb8417de7fb61b3 100644 (file)
@@ -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;