From: Clif H. <cl...@di...> - 2002-02-11 01:46:07
|
There are several problem areas with the schema code. In fact the schema code is being completely reworked for the next release. Clif > > ----- Forwarded message from as...@uf... ----- > > Date: Sun, 10 Feb 2002 17:05:07 -0500 > To: gb...@po... > From: as...@uf... > Subject: possible bug, with exercising code, in Net::LDAP::Schema > > > > Graham, > > I think I may have stumbled across a bug in Net::LDAP::Schema. I'd like your > feedback. In some circumstances, Net::LDAP::Schema is reporting multiple OIDs > for attributes which I do not believe are in fact multiply defined. In each > of these thought-erroneous cases, one of the OIDs reported is the correct one, > and the other is a SYNTAX oid, not necessarily the appropriate syntax for the > attribute in question. > > I started to observe this behavior after I began inserting X-records in my > OpenLDAP schema, to help document a central project here at the University. > > I have left in the name of the development LDAP server, which should stay > up. If you run this script, you ought to get output looking like: > > [TELEPHONENUMBER] [] [2.5.4.20] [1.3.6.1.4.1.1466.115.121.1.50] > > The first field is an attribute name I supply. > The second is the undef returned when I call $schema->name() on it. > The remaining fields are the OIDs returned by name2oid. > > > If you think I'm smoking crack, please tell me so. I don't think my schema is > actually corrosive in some way. ;) > > - Allen S. Rout > > > #!/usr/local/bin/perl -- -*-Perl-*- > > use FileHandle; > use Net::LDAP; > use Net::LDAP::Schema; > > $ldap_server = "spnode33.nerdc.ufl.edu"; > > my $ldap = new Net::LDAP ($ldap_server); > > my $schema = $ldap->schema(); > > $oatr = 'TELEPHONENUMBER'; > #foreach $attr($oatr, $schema->attributes() ) > foreach $attr( $oatr) > { > print STDERR "[$attr]"." "x(29-length($attr)); > $nattr = $schema->name($attr); > print STDERR "[$nattr]"." "x(29-length($nattr)); > my @oid = $schema->name2oid($attr); > foreach $o (@oid) > {print STDERR "[$o] "; } > print STDERR "\n"; > } > exit 1; > > > ----- End forwarded message ----- > > |