]> git.sur5r.net Git - openldap/commitdiff
Hide select matching rules from published schema
authorKurt Zeilenga <kurt@openldap.org>
Sun, 6 Jan 2002 05:29:04 +0000 (05:29 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sun, 6 Jan 2002 05:29:04 +0000 (05:29 +0000)
servers/slapd/mr.c
servers/slapd/schema_init.c
servers/slapd/slap.h

index e8529a251c4b4cbda79cbf6baf9680540fb4e431..316ff13641621edf58ff5d7b8038e12b28e8ecb7 100644 (file)
@@ -280,6 +280,11 @@ int mr_schema_info( Entry *e )
        vals[1].bv_val = NULL;
 
        for ( mr = mr_list; mr; mr = mr->smr_next ) {
+               if ( mr->smr_usage & SLAP_MR_HIDE ) {
+                       /* skip hidden rules */
+                       continue;
+               }
+
                if ( ! mr->smr_match ) {
                        /* skip rules without matching functions */
                        continue;
index ed6015a74bcba1e50ab55f7cd095a28ffcfe9bd9..1555ce10564c3a4a41e86021511b6e304c51dd49 100644 (file)
@@ -4302,7 +4302,7 @@ static struct mrule_defs_rec {
         */
        {"( " directoryStringApproxMatchOID " NAME 'directoryStringApproxMatch' "
                "SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )",
-               SLAP_MR_EQUALITY_APPROX | SLAP_MR_EXT,
+               SLAP_MR_HIDE | SLAP_MR_EQUALITY_APPROX | SLAP_MR_EXT,
                NULL, NULL,
                directoryStringApproxMatch,
                directoryStringApproxIndexer, 
@@ -4311,7 +4311,7 @@ static struct mrule_defs_rec {
 
        {"( " IA5StringApproxMatchOID " NAME 'IA5StringApproxMatch' "
                "SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )",
-               SLAP_MR_EQUALITY_APPROX | SLAP_MR_EXT,
+               SLAP_MR_HIDE | SLAP_MR_EQUALITY_APPROX | SLAP_MR_EXT,
                NULL, NULL,
                IA5StringApproxMatch,
                IA5StringApproxIndexer, 
index 613936d15135c116e45781cfaf75c0c298a1d88a..32f1541e49a0049949c72f44bd80f04ea8474d2f 100644 (file)
@@ -273,13 +273,13 @@ typedef struct slap_syntax {
 #define ssyn_extensions                ssyn_syn.syn_extensions
        ber_len_t       ssyn_oidlen;
 
-       unsigned        ssyn_flags;
+       unsigned int ssyn_flags;
 
-#define SLAP_SYNTAX_NONE       0x00U
-#define SLAP_SYNTAX_BLOB       0x01U /* syntax treated as blob (audio) */
-#define SLAP_SYNTAX_BINARY     0x02U /* binary transfer required (certificate) */
-#define SLAP_SYNTAX_BER                0x04U /* stored using BER encoding (binary,certificate) */
-#define SLAP_SYNTAX_HIDE       0x80U /* hide (do not publish) */
+#define SLAP_SYNTAX_NONE       0x0000U
+#define SLAP_SYNTAX_BLOB       0x0001U /* syntax treated as blob (audio) */
+#define SLAP_SYNTAX_BINARY     0x0002U /* binary transfer required (certificate) */
+#define SLAP_SYNTAX_BER                0x0004U /* stored in BER encoding (certificate) */
+#define SLAP_SYNTAX_HIDE       0x8000U /* hide (do not publish) */
 
        slap_syntax_validate_func       *ssyn_validate;
        slap_syntax_transform_func      *ssyn_normalize;
@@ -347,7 +347,9 @@ typedef struct slap_matching_rule {
        ber_len_t                       smr_oidlen;
        slap_mask_t                             smr_usage;
 
-#define SLAP_MR_TYPE_MASK              0xFF00U
+#define SLAP_MR_HIDE                   0x8000U
+
+#define SLAP_MR_TYPE_MASK              0x0F00U
 #define SLAP_MR_SUBTYPE_MASK   0x00F0U
 #define SLAP_MR_USAGE                  0x000FU
 
@@ -371,9 +373,9 @@ typedef struct slap_matching_rule {
  * the provided value is expected to conform to the
  * attribute's value syntax.
  */
-#define SLAP_MR_ASSERTION_SYNTAX_MATCH 0x0000U
-#define SLAP_MR_VALUE_SYNTAX_MATCH 0x0001U
-#define SLAP_MR_VALUE_SYNTAX_CONVERTED_MATCH 0x0003U
+#define SLAP_MR_ASSERTION_SYNTAX_MATCH                 0x0000U
+#define SLAP_MR_VALUE_SYNTAX_MATCH                             0x0001U
+#define SLAP_MR_VALUE_SYNTAX_CONVERTED_MATCH   0x0003U
 
 #define SLAP_IS_MR_ASSERTION_SYNTAX_MATCH( usage ) \
        (!((usage) & SLAP_MR_VALUE_SYNTAX_MATCH))