[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: commit: ldap/servers/slapd filter.c

Howard Chu wrote:

> I guess we need a syntax flag that says "denormalization needed" and
> perhaps a usage flag for the normalizer that says "denormalize a
> normalized value"

Rather than "syntax", a "matching rule" flag, as normalization is per
matching rule.  UUID matching rules already have a
SLAP_MR_MUTATION_NORMALIZER that prevents UUIDs from being normalized
when used in a DN.  Probably we need to do something slightly different,
as the current approach would not normalize
badbadef-dbad-1029-92f7-badbadbadbad unless dnPrettyNormal is called: in
that case, pretty would lowercase the A-F chars, so normal would see
them lowercased.  For example:

$ slapdn 'entryUUID=BADBADEF-DBAD-1029-92f7-BADBADBADBAD' -N
$ slapdn 'entryUUID=BADBADEF-DBAD-1029-92f7-BADBADBADBAD' -P
$ slapdn 'entryUUID=BADBADEF-DBAD-1029-92f7-BADBADBADBAD'
DN: <entryUUID=BADBADEF-DBAD-1029-92f7-BADBADBADBAD> check succeeded
normalized: <entryUUID=badbadef-dbad-1029-92f7-badbadbadbad>
pretty:     <entryUUID=badbadef-dbad-1029-92f7-badbadbadbad>

which sounds a bit inconsistent (no issue in slapd: DNs coming from
client requests are always pretty-normalized, while DNs for internal use
are always in pretty or normal form).

So I'd go for using the SLAP_MR_MUTATION_NORMALIZER flag to determine if
a value needs to be de-normalized, and OR it to the usage in
normalization hooks (smr_normalize) to instruct them to de-normalize
rather than normalize values.


Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it