Re: ldap-bind

Bryan Irvine <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.ldap
Message-ID <[email protected]>
On Wed, Jun 10, 2009 at 1:15 PM, Graham Barr<[email protected]> wrote:
>
> On Jun 10, 2009, at 3:07 PM, Bryan Irvine wrote:
>
>> That's my problem then.
>>
>> Is there a way to check for bind failure?
>
> Yes, see Net::LDAP::Message and Net::LDAP::Constant docs
>
> the bind will fail, but the server will allow requests to continue as if the
> bind had not happened. ie it will treat the connection as anonymous
>
> Graham.
>

Am I missing something really obvious?

PERL code:
my $errorMsg = $ldaps->bind ( "cn=crappy code" ) ;
print "dn: " . $errorMsg->dn . "\n" ;
print "error: " . $errorMsg->error . "\n" ;
print "done: " . $errorMsg->done . "\n" ;
print "is_error: " . $errorMsg->is_error . "\n" ;


PERL output:
dn:
error: Success
done: 1
is_error: 0

Is it reporting sucess because it was able to 'fallback and rebind'?
If so how do I get the failure of the initial bind?

-Bryan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.