From: Steve N. <ne...@na...> - 2001-05-23 04:33:14
|
I am writing some scripts to make sure that several Netscape Director Servers are configured the same. Part of the process is to make sure that they have the same objectclasses, attributres, matching rules, and syntaxes. While writing the object class part I may have encountered a bug. There is both an attribute and object class named "locality" in the netscape directory server: neruda@farmer:config> sudo grep -i locality slapd.*.conf slapd.at.conf:attribute l locality localityname 2.5.4.7 cis slapd.oc.conf:objectclass locality Now if I run this test script below I would expect to see only object classes printed out put instead 'locality' shows up as an attribute: #!/usr/bin/perl use Net::LDAP; use Net::LDAP::LDIF; use Net::LDAP::Schema; $host1="localhost"; $port1="3389"; my $ldap1 = Net::LDAP->new($host1,dn=>'cn=Directory Manager',password=>'c00kie$4mango',port=>"$port1") || die "couldn't connect to $host1 on port $port1" ; $ldap1->bind(); $schema1 = $ldap1->schema(); die "Get schema1 failed" unless $schema1; @objs= $schema1->objectclasses; foreach $oc (@objs) { if ($schema1->is_objectclass($oc)) { print "OBJECTCLASS: $oc\n"; @must = $schema1->must($oc); @may = $schema1->may($oc); } else { print "attribute: $oc" if $schema1->is_attribute($oc); print "is_syntax: $oc" if $schema1->is_syntax($oc); print "is_matchingrule: $oc" if $schema1->is_matchingrule($oc); print "\n\n"; } print "----------------------------------------------------------------\n" } Output: OBJECTCLASS: TOP ---------------------------------------------------------------- OBJECTCLASS: ALIAS ---------------------------------------------------------------- OBJECTCLASS: COUNTRY ---------------------------------------------------------------- attribute: LOCALITY Am I doing something wrong here? |