Issue 498 - LDAP V3 - read schema from server
Summary: LDAP V3 - read schema from server
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: 2000-04-11 13:02 UTC by paulcun@sco.com
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 paulcun@sco.com 2000-04-11 13:02:54 UTC
Full_Name: Paul Cunningham
Version: openldap-2_0-alpha3
OS: Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (150.126.24.200)


If I try to read the schema from the LDAP V3 server using:

	ldapsearch -h scofix -b "cn=schema" -s base "objectclass=*"

it only returns the following:

	CN=SCHEMA
	cn=SCHEMA
	objectclass=top
	objectclass=LDAPsubentry
	objectclass=subschema
	objectclass=extensibleObject

shouldn't it return the full schema definition (netscapeDS & IBMSecureWay 
do).

Is this a bug or am I doing something wrong.

Thanks.
Comment 1 Kurt Zeilenga 2000-04-11 16:32:25 UTC
At 01:02 PM 4/11/00 GMT, paulcun@sco.com wrote:
>Full_Name: Paul Cunningham
>Version: openldap-2_0-alpha3
>OS: Linux
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (150.126.24.200)
>
>
>If I try to read the schema from the LDAP V3 server using:
>
>	ldapsearch -h scofix -b "cn=schema" -s base "objectclass=*"
>
>it only returns the following:
>
>	CN=SCHEMA
>	cn=SCHEMA
>	objectclass=top
>	objectclass=LDAPsubentry
>	objectclass=subschema
>	objectclass=extensibleObject
>
>shouldn't it return the full schema definition (netscapeDS & IBMSecureWay 
>do).
>
>Is this a bug or am I doing something wrong.

You did not specify which attribute types to return.  As they
are operational, you must explicitly list them.
Comment 2 Yohann Fourteau 2000-04-11 16:51:29 UTC
paulcun@sco.com wrote:
> 
> If I try to read the schema from the LDAP V3 server using:
> 
>         ldapsearch -h scofix -b "cn=schema" -s base "objectclass=*"
> 
> it only returns the following:
> 
>         CN=SCHEMA
>         cn=SCHEMA
>         objectclass=top
>         objectclass=LDAPsubentry
>         objectclass=subschema
>         objectclass=extensibleObject
> 
> shouldn't it return the full schema definition (netscapeDS & IBMSecureWay
> do).

Why do you set -b to "cn=schema" ? Why not -b "" ?

Beside in the RFC :
   Clients MUST only retrieve attributes from a subschema entry by
   requesting a base object search of the entry, where the search filter
   is "(objectClass=subschema)". (This will allow LDAPv3 servers which
   gateway to X.500(93) to detect that subentry information is being
   requested.)

So your "(objectClass=*)" must be "(objectClass=subschema)".


-- 
Yohann F.
Comment 3 Kurt Zeilenga 2000-04-11 18:20:05 UTC
changed notes
changed state Open to Closed
Comment 4 Kurt Zeilenga 2000-04-11 19:34:36 UTC
At 04:52 PM 4/11/00 GMT, yohann.fourteau@webmotion.net wrote:
>paulcun@sco.com wrote:
>> 
>> If I try to read the schema from the LDAP V3 server using:
>> 
>>         ldapsearch -h scofix -b "cn=schema" -s base "objectclass=*"
>> 
>> it only returns the following:
>> 
>>         CN=SCHEMA
>>         cn=SCHEMA
>>         objectclass=top
>>         objectclass=LDAPsubentry
>>         objectclass=subschema
>>         objectclass=extensibleObject
>> 
>> shouldn't it return the full schema definition (netscapeDS & IBMSecureWay
>> do).
>
>Why do you set -b to "cn=schema" ? Why not -b "" ?

The base should be the DN of the desired subschema subentry as
determined by reading the subschemasubentry attribute of the
entry to be access (or, if adding an entry, the entry at the
root of the namingContext).  As hinted to in RFC 2251 (and
clarified in IETF LDAPext WG discussion), clients cannot
rely on the value(s) subschemasubentry attribute of the RootDSE
to apply a particular naming context.  [In fact, the subschemasubentry
of the RootDSE *should* be the subschema controlling the RootDSE itself
which may be quite different than that controlling a particular naming
context].

I hope to get this and related issues clarified in RFC2251bis
documents (when they are drafted).

	Kurt
Comment 5 OpenLDAP project 2014-08-01 21:06:10 UTC
devel issue