mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-23 14:09:39 +08:00
Hide select matching rules from published schema
This commit is contained in:
parent
c7a0c436d2
commit
645ae7a22f
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user