From: Clif H. <c-h...@ti...> - 2000-06-19 19:00:25
Attachments:
Examples.pod.diff
Schema.pod.diff
|
Graham, Attached are the diff files for Schema.pod and Examples.pod. Schema.pod I have documented the items and item methods. Format of diff command: diff -c Schema.pod_v0.19 Schema.pod >! Schema.pod.diff Examples.pod I put in a write up and code snippet on how to get and display schema information. Format of diff command; diff -c Examples.pod_v0.19 Examples.pod >! Examples.pod.diff I will probably start looking into the matchingrules parsing within the next few days. Regards, Clif Harden INTERNET: c-h...@ti... |
From: Graham B. <gb...@po...> - 2000-06-19 19:49:42
|
Clif, Excellent. Thanks you Graham On Mon, Jun 19, 2000 at 01:52:31PM -0500, Clif Harden wrote: > > Graham, > > Attached are the diff files for Schema.pod and Examples.pod. > > Schema.pod > > I have documented the items and item methods. > Format of diff command: > diff -c Schema.pod_v0.19 Schema.pod >! Schema.pod.diff > > Examples.pod > > I put in a write up and code snippet on how to get and display > schema information. > Format of diff command; > diff -c Examples.pod_v0.19 Examples.pod >! Examples.pod.diff > > I will probably start looking into the matchingrules parsing > within the next few days. > > Regards, > > Clif Harden INTERNET: c-h...@ti... |
From: Chris R. <Chr...@me...> - 2000-06-20 13:48:03
|
On Mon, 19 Jun 2000 13:52:31 CDT, Clif Harden wrote: > + After a successful bind you are ready to retrieve the schema > + information. You do this by initializing a schema object. > + > + $schema = $ldap->schema(); > + > + In this case the default schema commonName (cn) is being > + used to retrieve the schema. That description is wrong. schema() will retrieve the schema held by the server using information present in the server's root DSE. See RFC 2251 section 3.4 > + or > + > + $schema = $ldap->schema($cn); > + > + In this case an alternative schema commonName (cn) is being > + used to retrieve the schema. That's wrong for similar reasons. The argument is actually the DN of a subentry or entry that contains the schema. X.500 servers will for instance, have subschema stored in subentries below the points which they are mastering, eg <cn=subschema-subentry,o=Y oyodyne,c=US>, *not* directly below the root. > + The default LDAP schema name is cn=schema. However this > + may not always be the case, Microsoft Exchange systems are known > + to build a schema commonName (cn) that is based on domain and > + server name. There is no default schema name in the standards. However, Net::LDAP will guess at a DN of <cn=schema> if it cannot find the subschemaSubentry attribute in the root DSE. Looks good otherwise! Chris |
From: Clif H. <cl...@di...> - 2000-06-20 13:55:12
|
> > On Mon, 19 Jun 2000 13:52:31 CDT, Clif Harden wrote: > > + After a successful bind you are ready to retrieve the schema > > + information. You do this by initializing a schema object. > > + > > + $schema = $ldap->schema(); > > + > > + In this case the default schema commonName (cn) is being > > + used to retrieve the schema. > > That description is wrong. schema() will retrieve the schema held by > the server using information present in the server's root DSE. See RFC > 2251 section 3.4 > > > + or > > + > > + $schema = $ldap->schema($cn); > > + > > + In this case an alternative schema commonName (cn) is being > > + used to retrieve the schema. > > That's wrong for similar reasons. The argument is actually the DN of a > subentry or entry that contains the schema. > > X.500 servers will for instance, have subschema stored in subentries > below the points which they are mastering, eg <cn=subschema-subentry,o=Y > oyodyne,c=US>, *not* directly below the root. > > > + The default LDAP schema name is cn=schema. However this > > + may not always be the case, Microsoft Exchange systems are known > > + to build a schema commonName (cn) that is based on domain and > > + server name. > > There is no default schema name in the standards. However, Net::LDAP > will guess at a DN of <cn=schema> if it cannot find the > subschemaSubentry attribute in the root DSE. > > Looks good otherwise! > > Chris > > What I was refering to on the default schema name is that LDAP.pm has a default schema name of "cn=schema" if it does not find a root DSE, not that the LDAP/x.500 standards have a default schema. Bad choice of words on my part. Regards, Clif Harden INTERNET: c-h...@ti... |
From: Graham B. <gb...@po...> - 2000-06-20 14:10:31
|
On Tue, Jun 20, 2000 at 08:47:13AM -0500, Clif Harden wrote: > What I was refering to on the default schema name is that LDAP.pm > has a default schema name of "cn=schema" if it does not find a root > DSE, not that the LDAP/x.500 standards have a default schema. > > Bad choice of words on my part. Do you want to update your patch and resend. Thanks, Graham. |
From: Graham B. <gb...@po...> - 2000-06-20 22:10:13
|
OK, I changed this bit to After a successful bind you are ready to retrieve the schema information. You do this by initializing a schema object. $schema = $ldap->schema(); In this case Net::LDAP will attempt to determine the dn under which the schema can be found. First it will look for the attribute C<subschemasubentry> in the root DSE. If that cannot be found then it will default to the assumption of C<cn=schema> Alternatively you can specify the dn where the schema is to be found with $schema = $ldap->schema(dn => $dn); Once we have a dn to search for, Net::LDAP will fetch the schema entry with $mesg = $self->search( base => $dn, scope => 'base', filter => '(objectClass=*)', ); Once the schema object has been initialized, schema methods are used to retrieve the data. There are a number of ways this can be done. Information on the schema methods can be found in the Net::LDAP::Schema pod documentation. Graham. On Tue, Jun 20, 2000 at 02:44:04PM +0100, Chris Ridd wrote: > On Mon, 19 Jun 2000 13:52:31 CDT, Clif Harden wrote: > > + After a successful bind you are ready to retrieve the schema > > + information. You do this by initializing a schema object. > > + > > + $schema = $ldap->schema(); > > + > > + In this case the default schema commonName (cn) is being > > + used to retrieve the schema. > > That description is wrong. schema() will retrieve the schema held by > the server using information present in the server's root DSE. See RFC > 2251 section 3.4 > > > + or > > + > > + $schema = $ldap->schema($cn); > > + > > + In this case an alternative schema commonName (cn) is being > > + used to retrieve the schema. > > That's wrong for similar reasons. The argument is actually the DN of a > subentry or entry that contains the schema. > > X.500 servers will for instance, have subschema stored in subentries > below the points which they are mastering, eg <cn=subschema-subentry,o=Y > oyodyne,c=US>, *not* directly below the root. > > > + The default LDAP schema name is cn=schema. However this > > + may not always be the case, Microsoft Exchange systems are known > > + to build a schema commonName (cn) that is based on domain and > > + server name. > > There is no default schema name in the standards. However, Net::LDAP > will guess at a DN of <cn=schema> if it cannot find the > subschemaSubentry attribute in the root DSE. > > Looks good otherwise! > > Chris > > |