mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
(Quick)fix UUID naming attributes
This commit is contained in:
parent
adfa1f5918
commit
439af9ec10
@ -386,7 +386,9 @@ LDAPRDN_rewrite( LDAPRDN rdn, unsigned flags, void *ctx )
|
|||||||
} else { /* normalization */
|
} else { /* normalization */
|
||||||
validf = ad->ad_type->sat_syntax->ssyn_validate;
|
validf = ad->ad_type->sat_syntax->ssyn_validate;
|
||||||
mr = ad->ad_type->sat_equality;
|
mr = ad->ad_type->sat_equality;
|
||||||
if( mr ) normf = mr->smr_normalize;
|
if( mr && (!( mr->smr_usage & SLAP_MR_MUTATION_NORMALIZER ))) {
|
||||||
|
normf = mr->smr_normalize;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( validf ) {
|
if ( validf ) {
|
||||||
@ -516,7 +518,9 @@ LDAPDN_rewrite( LDAPDN dn, unsigned flags, void *ctx )
|
|||||||
} else { /* normalization */
|
} else { /* normalization */
|
||||||
validf = ad->ad_type->sat_syntax->ssyn_validate;
|
validf = ad->ad_type->sat_syntax->ssyn_validate;
|
||||||
mr = ad->ad_type->sat_equality;
|
mr = ad->ad_type->sat_equality;
|
||||||
if( mr ) normf = mr->smr_normalize;
|
if( mr && (!( mr->smr_usage & SLAP_MR_MUTATION_NORMALIZER ))) {
|
||||||
|
normf = mr->smr_normalize;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( validf ) {
|
if ( validf ) {
|
||||||
|
@ -2187,7 +2187,7 @@ UUIDValidate(
|
|||||||
return LDAP_SUCCESS;
|
return LDAP_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
int
|
||||||
UUIDNormalize(
|
UUIDNormalize(
|
||||||
slap_mask_t usage,
|
slap_mask_t usage,
|
||||||
Syntax *syntax,
|
Syntax *syntax,
|
||||||
@ -3873,14 +3873,14 @@ static slap_mrule_defs_rec mrule_defs[] = {
|
|||||||
|
|
||||||
{"( 1.3.6.1.1.16.2 NAME 'UUIDMatch' "
|
{"( 1.3.6.1.1.16.2 NAME 'UUIDMatch' "
|
||||||
"SYNTAX 1.3.6.1.1.16.1 )",
|
"SYNTAX 1.3.6.1.1.16.1 )",
|
||||||
SLAP_MR_EQUALITY, NULL,
|
SLAP_MR_EQUALITY | SLAP_MR_MUTATION_NORMALIZER, NULL,
|
||||||
NULL, UUIDNormalize, octetStringMatch,
|
NULL, UUIDNormalize, octetStringMatch,
|
||||||
octetStringIndexer, octetStringFilter,
|
octetStringIndexer, octetStringFilter,
|
||||||
NULL},
|
NULL},
|
||||||
|
|
||||||
{"( 1.3.6.1.1.16.3 NAME 'UUIDOrderingMatch' "
|
{"( 1.3.6.1.1.16.3 NAME 'UUIDOrderingMatch' "
|
||||||
"SYNTAX 1.3.6.1.1.16.1 )",
|
"SYNTAX 1.3.6.1.1.16.1 )",
|
||||||
SLAP_MR_ORDERING, NULL,
|
SLAP_MR_ORDERING | SLAP_MR_MUTATION_NORMALIZER, NULL,
|
||||||
NULL, UUIDNormalize, octetStringOrderingMatch,
|
NULL, UUIDNormalize, octetStringOrderingMatch,
|
||||||
octetStringIndexer, octetStringFilter,
|
octetStringIndexer, octetStringFilter,
|
||||||
"UUIDMatch"},
|
"UUIDMatch"},
|
||||||
|
@ -511,6 +511,8 @@ typedef struct slap_matching_rule {
|
|||||||
#define SLAP_MR_HIDE 0x8000U
|
#define SLAP_MR_HIDE 0x8000U
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define SLAP_MR_MUTATION_NORMALIZER 0x4000U
|
||||||
|
|
||||||
#define SLAP_MR_TYPE_MASK 0x0F00U
|
#define SLAP_MR_TYPE_MASK 0x0F00U
|
||||||
#define SLAP_MR_SUBTYPE_MASK 0x00F0U
|
#define SLAP_MR_SUBTYPE_MASK 0x00F0U
|
||||||
#define SLAP_MR_USAGE 0x000FU
|
#define SLAP_MR_USAGE 0x000FU
|
||||||
|
@ -21,6 +21,7 @@ member: ou=Sales\3B Data\2BAlgorithms,dc=example,dc=net
|
|||||||
member:: Y249QmVmb3JlDUFmdGVyLGRjPWV4YW1wbGUsZGM9bmV0
|
member:: Y249QmVmb3JlDUFmdGVyLGRjPWV4YW1wbGUsZGM9bmV0
|
||||||
member: cn=\23John Smith\20,dc=example,dc=net
|
member: cn=\23John Smith\20,dc=example,dc=net
|
||||||
member:: Y249THXEjWnEhw==
|
member:: Y249THXEjWnEhw==
|
||||||
|
member: testUUID=597ae2f6-16a6-1027-98f4-d28b5365dc14,dc=Example
|
||||||
seeAlso: cn=John Smith\2C III,dc=example,dc=net
|
seeAlso: cn=John Smith\2C III,dc=example,dc=net
|
||||||
seeAlso: ou=Sales\3B Data\2BAlgorithms,dc=example,dc=net
|
seeAlso: ou=Sales\3B Data\2BAlgorithms,dc=example,dc=net
|
||||||
seeAlso: cn=\23John Smith\20,dc=example,dc=net
|
seeAlso: cn=\23John Smith\20,dc=example,dc=net
|
||||||
@ -40,6 +41,7 @@ description: CN=Before\0dAfter,DC=example,DC=net
|
|||||||
description: CN=\23John Smith\20,DC=example,DC=net
|
description: CN=\23John Smith\20,DC=example,DC=net
|
||||||
description: CN=\#John Smith\ ,DC=example,DC=net
|
description: CN=\#John Smith\ ,DC=example,DC=net
|
||||||
description: CN=Lu\C4\8Di\C4\87
|
description: CN=Lu\C4\8Di\C4\87
|
||||||
|
description: testUUID=597ae2f6-16a6-1027-98f4-d28b5365dc14,DC=Example
|
||||||
|
|
||||||
dn: cn=Unescaped Equals,ou=LDAPv3,dc=example,dc=com
|
dn: cn=Unescaped Equals,ou=LDAPv3,dc=example,dc=com
|
||||||
objectClass: groupOfNames
|
objectClass: groupOfNames
|
||||||
@ -120,6 +122,7 @@ member: ou=Sales\3B Data\2BAlgorithms,dc=example,dc=net
|
|||||||
member:: Y249QmVmb3JlDUFmdGVyLGRjPWV4YW1wbGUsZGM9bmV0
|
member:: Y249QmVmb3JlDUFmdGVyLGRjPWV4YW1wbGUsZGM9bmV0
|
||||||
member: cn=\23John Smith\20,dc=example,dc=net
|
member: cn=\23John Smith\20,dc=example,dc=net
|
||||||
member:: Y249THXEjWnEhw==
|
member:: Y249THXEjWnEhw==
|
||||||
|
member: testUUID=597ae2f6-16a6-1027-98f4-d28b5365dc14,dc=Example
|
||||||
seeAlso: cn=John Smith\2C III,dc=example,dc=net
|
seeAlso: cn=John Smith\2C III,dc=example,dc=net
|
||||||
seeAlso: ou=Sales\3B Data\2BAlgorithms,dc=example,dc=net
|
seeAlso: ou=Sales\3B Data\2BAlgorithms,dc=example,dc=net
|
||||||
seeAlso: cn=\23John Smith\20,dc=example,dc=net
|
seeAlso: cn=\23John Smith\20,dc=example,dc=net
|
||||||
@ -139,6 +142,7 @@ description: CN=Before\0dAfter,DC=example,DC=net
|
|||||||
description: CN=\23John Smith\20,DC=example,DC=net
|
description: CN=\23John Smith\20,DC=example,DC=net
|
||||||
description: CN=\#John Smith\ ,DC=example,DC=net
|
description: CN=\#John Smith\ ,DC=example,DC=net
|
||||||
description: CN=Lu\C4\8Di\C4\87
|
description: CN=Lu\C4\8Di\C4\87
|
||||||
|
description: testUUID=597ae2f6-16a6-1027-98f4-d28b5365dc14,dc=Example
|
||||||
|
|
||||||
dn: cn=Name and Optional UID,ou=Related Syntaxes,dc=example,dc=com
|
dn: cn=Name and Optional UID,ou=Related Syntaxes,dc=example,dc=com
|
||||||
objectClass: groupOfUniqueNames
|
objectClass: groupOfUniqueNames
|
||||||
|
@ -18,6 +18,7 @@ include @SCHEMADIR@/cosine.schema
|
|||||||
include @SCHEMADIR@/inetorgperson.schema
|
include @SCHEMADIR@/inetorgperson.schema
|
||||||
include @SCHEMADIR@/openldap.schema
|
include @SCHEMADIR@/openldap.schema
|
||||||
include @SCHEMADIR@/nis.schema
|
include @SCHEMADIR@/nis.schema
|
||||||
|
include @DATADIR@/test.schema
|
||||||
|
|
||||||
#
|
#
|
||||||
pidfile @TESTDIR@/slapd.1.pid
|
pidfile @TESTDIR@/slapd.1.pid
|
||||||
|
@ -24,6 +24,7 @@ member: OU=Sales\; Data\+Algorithms,DC=example,DC=net
|
|||||||
member: CN=Before\0dAfter,DC=example,DC=net
|
member: CN=Before\0dAfter,DC=example,DC=net
|
||||||
member: CN=\23John Smith\20,DC=example,DC=net
|
member: CN=\23John Smith\20,DC=example,DC=net
|
||||||
member: CN=Lu\C4\8Di\C4\87
|
member: CN=Lu\C4\8Di\C4\87
|
||||||
|
member: testUUID=597ae2f6-16a6-1027-98f4-d28b5365dc14,DC=Example
|
||||||
# DN forms already defined as "member" in a different string representation
|
# DN forms already defined as "member" in a different string representation
|
||||||
seeAlso: CN=John Smith\2C III,DC=example,DC=net
|
seeAlso: CN=John Smith\2C III,DC=example,DC=net
|
||||||
seeAlso: OU=Sales\3B Data\2BAlgorithms,DC=example,DC=net
|
seeAlso: OU=Sales\3B Data\2BAlgorithms,DC=example,DC=net
|
||||||
@ -46,6 +47,7 @@ description: CN=Before\0dAfter,DC=example,DC=net
|
|||||||
description: CN=\23John Smith\20,DC=example,DC=net
|
description: CN=\23John Smith\20,DC=example,DC=net
|
||||||
description: CN=\#John Smith\ ,DC=example,DC=net
|
description: CN=\#John Smith\ ,DC=example,DC=net
|
||||||
description: CN=Lu\C4\8Di\C4\87
|
description: CN=Lu\C4\8Di\C4\87
|
||||||
|
description: testUUID=597ae2f6-16a6-1027-98f4-d28b5365dc14,DC=Example
|
||||||
|
|
||||||
dn: cn=Should Succeed,ou=LDAPv3,dc=example,dc=com
|
dn: cn=Should Succeed,ou=LDAPv3,dc=example,dc=com
|
||||||
objectClass: groupOfNames
|
objectClass: groupOfNames
|
||||||
|
@ -36,7 +36,6 @@ attributetype ( 1.3.6.1.4.1.4203.666.1.36
|
|||||||
SYNTAX 1.2.826.0.1.3344810.7.1 )
|
SYNTAX 1.2.826.0.1.3344810.7.1 )
|
||||||
|
|
||||||
# generalized time testing
|
# generalized time testing
|
||||||
|
|
||||||
attributetype ( 1.3.6.1.4.1.4203.666.1.37
|
attributetype ( 1.3.6.1.4.1.4203.666.1.37
|
||||||
name 'testTime'
|
name 'testTime'
|
||||||
equality generalizedTimeMatch
|
equality generalizedTimeMatch
|
||||||
@ -44,6 +43,14 @@ attributetype ( 1.3.6.1.4.1.4203.666.1.37
|
|||||||
syntax 1.3.6.1.4.1.1466.115.121.1.24
|
syntax 1.3.6.1.4.1.1466.115.121.1.24
|
||||||
single-value )
|
single-value )
|
||||||
|
|
||||||
|
# for UUID testing
|
||||||
|
attributetype ( 1.3.6.1.4.1.4203.666.1.56
|
||||||
|
name 'testUUID'
|
||||||
|
equality UUIDMatch
|
||||||
|
ordering UUIDOrderingMatch
|
||||||
|
syntax 1.3.6.1.1.16.1 )
|
||||||
|
|
||||||
|
# for obsolete testing
|
||||||
attributetype ( 1.3.6.1.4.1.4203.666.1.38
|
attributetype ( 1.3.6.1.4.1.4203.666.1.38
|
||||||
name 'testObsolete'
|
name 'testObsolete'
|
||||||
obsolete
|
obsolete
|
||||||
@ -59,3 +66,4 @@ objectClass ( 1.3.6.1.3.1.4203.666.3.16
|
|||||||
name 'obsoletePerson'
|
name 'obsoletePerson'
|
||||||
obsolete auxiliary
|
obsolete auxiliary
|
||||||
may ( testObsolete ) )
|
may ( testObsolete ) )
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user