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

Internal states o_dn and o_ndn are the same (ITS#2304)



Full_Name: Brian Candler
Version: 2.0.27
OS: FreeBSD-4.7-RELEASE
URL: 
Submission from: (NULL) (212.74.112.53)


In a be_search function, the variables op->o_dn and op->o_ndn are supposed to
present the raw DN and the normalised DN respectively which were used to bind,
as far as I can see.

However, after a simple bind, both contain the normalised DN.

o_dn is assigned from conn->c_dn, and is in turn normalised into o_ndn (see
connection_op_activate() in servers/slapd/connection.c)

But it seems that c_dn contains the normalised name already. From bind.c:

                ret = (*be->be_bind)( be, conn, op, dn, ndn,
                        method, &cred, &edn );
                ...
                                conn->c_dn = ndn;        // <<< normalised

Whereas c_cdn contains the raw DN.

So, should op->o_dn be initialised from conn->c_cdn?
Or should conn->c_dn be initialised from dn rather than ndn?

[Reason this is a problem for me: I have an LDAP backend which, non-standardly,
requires its bind DN to be case-sensitive. I can't validate the DN properly in
back-foo/search.c if it has been uppercased.]