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

Re: Duplicate cn entries

On Wed, 2003-05-14 at 19:32, Dave Horsfall wrote:
> On Wed, 14 May 2003, David Smith wrote:
> > Using OpenLDAP 2.0.27. When I try to do an ldap_mod_add to add a
> > duplicate value to the cn attribute of an object, OpenLDAP correctly
> > refuses to perform the operation, claiming "Type or value exists".
> > This, I believe, is correct behavior. For example, if I have an object
> > whose cn is Bart, and I try to do ldap_mod_add to add a new cn value of
> > Bart, OpenLDAP correctly refuses. However, when I do an ldap_modify or
> > an ldap_add that would create duplicate cn entries, OpenLDAP _does_
> > perform the modification. Is this correct behavior? Is there a rule with
> > regard to duplicate entries like this?
> The attribute "cn" is allowed to be multi-valued by default, but it
> makes little sense to add a new one with the same value as an existing
> one...

I know that it doesn't make sense to do this for a cn, it was just an
example. The reason I am asking is because I am writing an LDAP client
and need to be aware of such things. What I was saying is that by using
ldap_mod_add I was refused, but using ldap_modify or ldap_add, it
accepted. The outcome is the same, thus I wonder if this is a bug or
expected behavior.

Dave Smith
System Programmer, BYU CS Department
GPG Fingerprint: F907 A5C6 17AE C55D CE33  9F05 A829 B63C 99AE 2919