From: Graham B. <gb...@po...> - 2000-05-04 10:42:26
|
On Thu, May 04, 2000 at 11:19:51AM +0100, tim fulcher wrote: > > Hi, > > I'm trying to write a class which registers and subsequently checks > itself against a LDAP server. > > Firstly, I seem to be able to bind to the server OK when I supply a dn > for an object that doesn't yet exist, which seems to be contradictory to > trying, say a command line ldapsearch using the same dn as a bind > argument. (that gives no such object). Can you post the code you use to bind and how you check that the bind succeeded. > So once I've bound OK, I do a search based on the cn, and if just one > entry comes back I do the compare on it as follows: > > $cr = $self->{ldap}->compare ( $self->{searchresult}->entry(0) , > attr => 'port', value => $self->port(), > attr => 'ipaddress', value => $self->ipaddress(), > attr => 'seedfile', value =>$self->seedfile() > ); This will comapre the value of seedfile with $self->seedfile() > Can you not supply supply multiple attributes to a compare operation ? No, LDAP only supports the compare of a single attribute at a time. > When I run this I get compare true (code 6), even though as shown below, > my object attributes differ. When I run compare with just one attribute > it right gives a false result. Will I have to do the compare for each > attribute separately? That is because seedfile does compare Graham. |