On 11/17/2009 10:53 AM, Graham Barr wrote:
On Nov 13, 2009, at 11:57 AM, Kartik Subbarao wrote:
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 do not think the passing of client_new causes this, so perhaps there is a
different issue at hand.
Do you know where the recursion is happening ?
It looks like this is looping because the initial bind returns error
code 14 SASL_BIND_IN_PROGRESS. For some reason the module is not able to
handle the negotiation properly (or I'm still somehow not passing the
right $sasl variable).
Just as an example, here's how a successful SASL EXTERNAL bind via
ldapi:// looks like, with the OpenLDAP ldapwhoami command:
ldapwhoami -Y EXTERNAL
SASL/EXTERNAL authentication started
SASL username: gidNumber=389+uidNumber=389,cn=peercred,cn=external,cn=auth
SASL SSF: 0 dn:gidNumber=389+uidNumber=389,cn=peercred,cn=external,cn=auth
Can you try running this script on your system? Do you get the same results?
-Kartik