From: Yann R. <at...@at...> - 2000-06-10 20:27:10
|
I thought I sent this out in a second message, but here it goes again. I have figured that Net::LDAP is not capable of keeping two server connections alive at any one time. This following code example works, mainly because the first server is unbound and destroyed before the second connection is started. sub auth { my ($self, $uid, $passwd) = @_; $entry = $self->get_user_id($uid); # Get DN based on uidNumber, cn, or uid, which is $uid $self->{LDAP}->unbind; undef $self->{LDAP}; $self->{AUTHLDAP} = Net::LDAP->new("192.168.0.41") or die "$@"; my $mesg = $self->{AUTHLDAP}->bind($entry, password => $passwd); $self->{LDAP} = Net::LDAP->new("192.168.0.41") or die "$@"; $self->bind; if ($mesg->code) { $self->{AUTHLDAP}->unbind; undef $self->{AUTHLDAP}; return 1; } $self->{AUTHLDAP}->unbind; undef $self->{AUTHLDAP}; return 0; } Graham Barr wrote: > > There should be an error code. Can you show us some code that you > are using. > > Graham. > > On Thu, Jun 08, 2000 at 02:57:51PM -0700, Yann Ramin wrote: -- -------------------------------------------------------------------- Yann Ramin at...@at... Atrus Trivalie Productions www.atrustrivalie.eu.org irm.it.montereyhigh.com Monterey High IT www.montereyhigh.com ICQ 46805627 AIM oddatrus Marina, CA "All cats die. Socrates is dead. Therefore Socrates is a cat." - The Logician # fortune "To be responsive at this time, though I will simply say, and therefore this is a repeat of what I said previously, that which I am unable to offer in response is based on information available to make no such statement." -------------------------------------------------------------------- |