Kartik Subbarao <subba...@computer.org> writes:

> On 11/10/2009 04:32 PM, Graham Barr wrote:
>>
>> On Nov 10, 2009, at 2:46 PM, Kartik Subbarao wrote:
>>
>>> What is the right way to use SASL EXTERNAL authentication with
>>> Net::LDAP::LDAPI? I'm trying to do the equivalent of:
[...]

> I downloaded the next branch and tried this, but the code seems to
> hang indefinitely (the debugger complains about 99 levels deep in
> subroutine calls, probably some infinite recursion).
>
> Here's the code that I'm using:
>
> use Net::LDAP;
> use Net::LDAPI;
> use Authen::SASL;
>
> $ldap = Net::LDAP->new('ldapi://');
> $sasl = Authen::SASL->new(mechanism => 'EXTERNAL');
> $sasl_client = $sasl->client_new('ldap', 'localhost');
> $ldap->bind(undef, sasl => $sasl_client);

I think you should define a path to ldapi, something like

my $host = 'ldapi://%2Fvar%2Frun%2Fslapd%2Fldapi';
my $ldap = Net::LDAP->new("$host");

-Dieter 

-- 
Dieter Klünter | Systemberatung
http://dkluenter.de
GPG Key ID:8EF7B6C6
53°37'09,95"N
10°08'02,42"E

Reply via email to