Issue 5963 - Explictly deleting all object classes and re-add some fails in modify request
Summary: Explictly deleting all object classes and re-add some fails in modify request
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-20 10:50 UTC by Michael Ströder
Modified: 2021-09-11 10:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Michael Ströder 2009-02-20 10:50:34 UTC
Full_Name: Michael Str�der
Version: RE24 (synced right now)
OS: openSUSE 11.1
URL: 
Submission from: (NULL) (84.163.85.36)


If I explicitly remove all object classes of an entry by value and re-add some
of them the modify requests fail with
"Type or value exists: modify/add: objectClass: value #1 already exists"

Unfortunately I cannot provide a simple example for showing this. Specific
configuration and data upon request since it's private data which MUST NOT be
disclosed.
Comment 1 ando@openldap.org 2009-02-20 15:06:18 UTC
michael@stroeder.com wrote:

> If I explicitly remove all object classes of an entry by value and re-add some
> of them the modify requests fail with
> "Type or value exists: modify/add: objectClass: value #1 already exists"
> 
> Unfortunately I cannot provide a simple example for showing this. Specific
> configuration and data upon request since it's private data which MUST NOT be
> disclosed.

I could not reproduce it.  Probably, the best way to proceed is:

1) write down the objectClass values before and after the attempted 
modifications
2) classify them as ABSTRACT, STRUCTURAL, AUXILIARY
3) indicate any inheritance relationship
4) send the outcome of (2) and (3) after mangling the objectClass names 
as required.

This should allow you (and others) to try to reproduce the issue without 
the need to disclose your info.

p.


Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
-----------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Fax:     +39 0382 476497
Email:   ando@sys-net.it
-----------------------------------

Comment 2 Michael Ströder 2009-02-20 15:10:41 UTC
Pierangelo Masarati wrote:
> michael@stroeder.com wrote:
> 
>> If I explicitly remove all object classes of an entry by value and
>> re-add some
>> of them the modify requests fail with
>> "Type or value exists: modify/add: objectClass: value #1 already exists"
>>
>> Unfortunately I cannot provide a simple example for showing this. 
>> Specific configuration and data upon request since it's private
>> data which MUST NOT be disclosed.
> 
> I could not reproduce it.

I also can't reproduce it with standard object classes on my local system.

>  Probably, the best way to proceed is:

I could provide a canned config to a developer which should be kept
confidential. Do you take that?

Ciao, Michael.

Comment 3 Michael Ströder 2009-02-21 17:34:13 UTC
michael@stroeder.com wrote:
> If I explicitly remove all object classes of an entry by value and re-add some
> of them the modify requests fail with
> "Type or value exists: modify/add: objectClass: value #1 already exists"
> 
> Unfortunately I cannot provide a simple example for showing this. Specific
> configuration and data upon request since it's private data which MUST NOT be
> disclosed.

I think I found an example with standard object classes. The problem
seems to be the order of the inherited STRUCTURAL object classes. (Tests
done with HEAD.)

Import this entry and try to remove 'labeledURIObject' from it:

dn: ou=oc-mod-test,ou=Testing,dc=stroeder,dc=de
objectClass: OpenLDAPou
objectClass: organizationalUnit
objectClass: labeledURIObject
ou: oc-mod-test


If you reverse the order of the STRUCTURAL object classes or remove
'organizationalUnit' and let slapd re-add it works.

objectClass: organizationalUnit
objectClass: OpenLDAPou

Comment 4 ando@openldap.org 2009-02-22 22:32:06 UTC
michael@stroeder.com wrote:

> I think I found an example with standard object classes. The problem
> seems to be the order of the inherited STRUCTURAL object classes. (Tests
> done with HEAD.)
> 
> Import this entry and try to remove 'labeledURIObject' from it:
> 
> dn: ou=oc-mod-test,ou=Testing,dc=stroeder,dc=de
> objectClass: OpenLDAPou
> objectClass: organizationalUnit
> objectClass: labeledURIObject
> ou: oc-mod-test
> 
> 
> If you reverse the order of the STRUCTURAL object classes or remove
> 'organizationalUnit' and let slapd re-add it works.
> 
> objectClass: organizationalUnit
> objectClass: OpenLDAPou

The error is in the delete phase.  I performed

dn: ou=oc-mod-test,ou=Testing,dc=stroeder,dc=de
changetype: modify
delete: objectClass
objectClass: OpenLDAPou
objectClass: organizationalUnit
objectClass: labeledURIObject
-
add: objectClass
objectClass: OpenLDAPou
objectClass: organizationalUnit

What happens is that at the end of the delete phase, organizationalUnit 
is still there.  Apparently, the fix to ITS#5517 was not complete. 
Thanks for spotting it.

p.


Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
-----------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Fax:     +39 0382 476497
Email:   ando@sys-net.it
-----------------------------------

Comment 5 ando@openldap.org 2009-02-22 22:46:33 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 6 Quanah Gibson-Mount 2009-02-22 22:46:56 UTC
changed notes
changed state Test to Release
Comment 7 Quanah Gibson-Mount 2009-02-24 05:43:36 UTC
changed notes
changed state Release to Closed
Comment 8 OpenLDAP project 2014-08-01 21:04:19 UTC
related to ITS#5517
fixed in HEAD
fixed in RE24