[PATCH] ldb:rdn_name LDB module - add more RDN name constraints

Kamen Mazdrashki kamenim at samba.org
Sat Nov 20 13:37:25 MST 2010

Hi Matthias,

I see.
I was just expecting that all code related to DN construction/validation/etc
would be in a single place :)
Thanks for clarifying


On Sat, Nov 20, 2010 at 11:07, Matthias Dieter Wallnöfer <mdw at samba.org> wrote:
> This "=,cn=users,..." is invalid and already handled by the LDB DN code. The
> only case which I've added to "rdn_name.c" is the following:
> "cn=,cn=users,...". And there it's a bit more difficult: on add operations
> we get ERR_INVALID_DN_SYNTAX but on renames instead we do get
> ERR_NAMING_VIOLATION. I think this is since the DN is splitted in RDN part
> and parent DN on the LDAP protocol side. And an RDN part alone isn't a DN so
> AD will not return ERR_INVALID_DN_SYNTAX.
> Therefore I would keep this case in "rdn_name.c" since it's not easily
> doable in the LDB DN code.
> Cheers,
> Matthias
> Kamen Mazdrashki wrote:
>> Hi Matthias,
>> Please correct me if I am wrong, but in my understanding, DNs like
>> "=,cn=users,dc=bla,dc=com" are just invalid DNs.
>> Why we should handle this case in a module rather than in the
>> DN validate implementation?

More information about the samba-technical mailing list