Handling spaces in DNs

simo simo at samba.org
Wed Oct 24 12:27:05 GMT 2007


On Wed, 2007-10-24 at 15:40 +1000, Andrew Bartlett wrote:
> The work done a while back to limit how often we parsed and unparse a DN
> has had an unusual side-effect, that I would like some assistance in
> solving.
> 
> If we add a DN of the form:
> 
> cn=admins ,cn=users,dc=samba,dc=example,dc=org
> 
> Then the DN will remain in the database in that form, including the
> extra space around "admins".

This is just a bug, spaces at the end of the RDN components should just
be removed.

>   For maximum retention of information,
> while retaining a normalised form, it should be added like:
> 
> CN=admins,CN=users,DC=samba,DC=example,DC=org
> 
> Do we need to add a 'normalised DN' function to LDB, or override the
> current linearized form?  Would doing so negate the speed benefits that
> created this approach in the first place?

It depends how we add it and where.

> I'm hitting this in the ldap.js test, which now actually tests this
> area.  I've had to comment out the assert for now, see the attached
> patch. 

I will try to carve some time to fix this, please remind me if you don't
see anything by the end of the week.

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Senior Software Engineer at Red Hat Inc. <ssorce at redhat.com>



More information about the samba-technical mailing list