Issue 2053 - Objectclass inheritance mechanism in queries doesn't seem to work
Summary: Objectclass inheritance mechanism in queries doesn't seem to work
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: 2002-08-29 07:47 UTC by dev.openldap@cynode.org
Modified: 2014-08-01 21:06 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 Kurt Zeilenga 2002-08-29 07:30:20 UTC
moved from Incoming to Software Bugs
Comment 1 dev.openldap@cynode.org 2002-08-29 07:47:37 UTC
Full_Name: M.-A. DARCHE
Version: 2.1.4
OS: GNU/Linux
URL: 
Submission from: (NULL) (213.41.87.82)



RFC 2251 has a very short paragraph about objectclass inheritance :
   Each entry MUST have an objectClass attribute.
   ...
   When creating an entry or adding an objectClass value to
   an entry, all superclasses of the named classes are _implicitly_added_
   _as_well_if_not_already_present_, and the client must supply values for
   any mandatory attributes of new superclasses.

So, if an entry present in OpenLDAP has a superclass, querying for the
superclass should return this entry. Right now it doesn't :-(


There is a test in the source code distribution about search, named :
tests/scripts/test003-search
This test is passing, but doesn't contain a "true" case for inheritance
mechanism
testing.

test003-search tests querying, but only after populating with an LDIF content 
that _explicitly_ specifies objectclass attributes, thus invalidating any tests
on
inheritance.
The LDIF content is :
tests/data/test-ordered.ldif

As said, in this LDIF content every OpenLDAPperson entry is _explicitly_
specified
as a person objectclass :

  dn: cn=Ursula Hampster,ou=Alumni Association,ou=People,o=University of
Michigan,c=US
  objectclass: top
  objectclass: person
  objectclass: OpenLDAPperson

To exactly test inheritance, just add the following entry at the end of :
tests/data/test-ordered.ldif

  dn: cn=testEntry,ou=Alumni Association,ou=People,o=University of
Michigan,c=US
  objectclass: inetOrgPerson
  cn: testEntry
  sn: Test

And in test003-search, add the following :
echo "Testing inheritance searching..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
        '(objectclass=person)'

If OpenLDAP work as I understand it should, we should see the testEntry
entry returned... which is not the case.



Comment 2 Kurt Zeilenga 2002-08-29 15:59:00 UTC
A fix for this has been committed to the HEAD branch.
        Kurt

At 12:47 AM 2002-08-29, dev.openldap@cynode.org wrote:
>Full_Name: M.-A. DARCHE
>Version: 2.1.4
>OS: GNU/Linux
>URL: 
>Submission from: (NULL) (213.41.87.82)
>
>
>
>RFC 2251 has a very short paragraph about objectclass inheritance :
>   Each entry MUST have an objectClass attribute.
>   ...
>   When creating an entry or adding an objectClass value to
>   an entry, all superclasses of the named classes are _implicitly_added_
>   _as_well_if_not_already_present_, and the client must supply values for
>   any mandatory attributes of new superclasses.
>
>So, if an entry present in OpenLDAP has a superclass, querying for the
>superclass should return this entry. Right now it doesn't :-(
>
>
>There is a test in the source code distribution about search, named :
>tests/scripts/test003-search
>This test is passing, but doesn't contain a "true" case for inheritance
>mechanism
>testing.
>
>test003-search tests querying, but only after populating with an LDIF content 
>that _explicitly_ specifies objectclass attributes, thus invalidating any tests
>on
>inheritance.
>The LDIF content is :
>tests/data/test-ordered.ldif
>
>As said, in this LDIF content every OpenLDAPperson entry is _explicitly_
>specified
>as a person objectclass :
>
>  dn: cn=Ursula Hampster,ou=Alumni Association,ou=People,o=University of
>Michigan,c=US
>  objectclass: top
>  objectclass: person
>  objectclass: OpenLDAPperson
>
>To exactly test inheritance, just add the following entry at the end of :
>tests/data/test-ordered.ldif
>
>  dn: cn=testEntry,ou=Alumni Association,ou=People,o=University of
>Michigan,c=US
>  objectclass: inetOrgPerson
>  cn: testEntry
>  sn: Test
>
>And in test003-search, add the following :
>echo "Testing inheritance searching..."
>$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
>        '(objectclass=person)'
>
>If OpenLDAP work as I understand it should, we should see the testEntry
>entry returned... which is not the case.

Comment 3 dev.openldap@cynode.org 2002-08-30 17:53:44 UTC
Le 2002-08-29 08:59 (jeudi), Kurt D. Zeilenga a écrit / 
On 2002-08-29 08:59 (jeudi), Kurt D. Zeilenga wrote :
> A fix for this has been committed to the HEAD branch.
>         Kurt

The fix works exactly as expected. Bug should be closed.

Moreover, it's good to see that a new 
"test for objectClass/attributeType inheritance ..."
in the file tests/scripts/test003-search

Many thanks for this amazingly fast correction.

-- 
Marc-Aurèle DARCHE  <http://www.cynode.org>
AFUL <http://www.aful.org>
Association Francophone des Utilisateurs de Linux/Logiciels Libres
French speaking Linux and Libre Software Users' Association

Comment 4 Kurt Zeilenga 2002-09-05 10:10:54 UTC
changed notes
changed state Open to Test
Comment 5 Kurt Zeilenga 2002-09-05 18:51:49 UTC
changed state Test to Release
Comment 6 Kurt Zeilenga 2002-09-05 18:52:01 UTC
changed notes
Comment 7 Kurt Zeilenga 2002-09-19 13:22:40 UTC
changed notes
changed state Release to Closed
Comment 8 Howard Chu 2006-06-11 08:51:19 UTC
moved from Software Bugs to Archive.Software Bugs
Comment 9 OpenLDAP project 2014-08-01 21:06:25 UTC
Fixed in HEAD
Fixed in re21