[Date Prev][Date Next]
Re: ldap_str2dn etc.
"Kurt D. Zeilenga" wrote:
> >2) what's the best way to check attribute description from a library
> >function, i.e. not from inside slapd? Which functions do address the
> >problem? Or, in other words, do I need to (hard)code RFC 2252 attribute
> >types somewhere in the library?
> Even in pedantic mode, I suggest not restricting the attributeType
> by name to a table. Maybe we can have a table flag that uses
> hardcoded or application provided tables. But let's skip that for
Does this mean I'd leave AttributeTypes as they are (string or OID)
without reformatting them, regardless they're "common" or not?
> can do some simple normalizations of LDAPDN, such as sorting
> AVAs within a multi-valued RDN. This is what ldap_dn_normalize
> is intended to wrap.
Well, I've seen something about sorting AVAs within RDNs (RFC 2253):
When converting from an ASN.1 RelativeDistinguishedName to a string,
the output consists of the string encodings of each
AttributeTypeAndValue (according to 2.3), in any order.
> >But I'm a bit in trouble with DCE. What's the best source of information
> >on it (I mean the best within dn string representation issues)?
> See Luke's comment.
Maybe I'll introduce an extra flag LDAP_DN_AD_CANONICAL.
> >5) I guess the "LDAP_DN_PEDANTIC" flag means "strictly adhere to the
> >standards"; as a consequence the parsing should be as liberal as
> >if the flag is not set, right?
> Yes. There might be degrees of pedantic that make sense.
I'll figure out a list of possible liberals, and code them in flags.
We may also group liberals in appropriate masks that make sense
> For str2dn, one just needs to decode each escaped octet.
> For dn2str, each octet which is not a valid octet of a UTF-8
> character MUST be escaped. Other octets MAY be escaped.
> This is were flags come in. When escaping an octet which
> is part of a multi-octet UTF-8 character, each octet of the
> UTF-8 character must also be escaped. The LDAPbis draft
> may be clearer here.
Fine. I've been looking at the ldap_utf8* code, and I think I can
I'll let you know, and commit snapshots as soon as my work gets
together in usable pieces.
Dr. Pierangelo Masarati | voice: +39 02 2399 8309
Dip. Ing. Aerospaziale | fax: +39 02 2399 8334
Politecnico di Milano | mailto:firstname.lastname@example.org
via La Masa 34, 20156 Milano, Italy |