Hi,

Is any one using Net::LDAP with Cyrus SASL with mech GSSAPI. I have
seen a few threads on the mailing list but no conclusion, (if I
haven't missed it).

I can use ldapsearch -Y GSSAPI with no problems.

When I try with Net::LDAP 0.28 It says 'Decoding error' and looks like
its coming from Bind.pm line 43. And following search operation says
'SASL bind in progress'

When I try Net::LDAP 0.2701 then it binds successfully but then search
fails with a 'Local Error'

I am still learning SASL/GSSAPI, I might be doing a trivial error.

Any help or clue appreciated.

Thanks,

Ziya.

Software:
Heimdal 0.6
Cyrus-SASL 2.1.13
OpenLDAP 2.1.21
Bundle::Net::LDAP Updated
Authen::SASL 2.04
Authen::SASL::Cyrus 0.07


Code I am trying:

use Net::LDAP;

use Authen::SASL;

my $sasl = Authen::SASL->new(mechanism=>'GSSAPI',
                             host=>'l3.suezen.org',
                             user=>'ziya',
                             service=>'ldap');

#my $sasl = Authen::SASL->new(mechanism=>'GSSAPI',callback=>{user=>'u:ziya'});


use Carp 'verbose';

my $ldap = Net::LDAP->new(
                          'l3.suezen.org',
                          onerror=>'die',
                          #debug=>3,
                         );

print $ldap->bind(
                  sasl=>$sasl
                 )->error, "\n";



my $mesg =  $ldap->search (base=>"dc=suezen,dc=org",
                           filter=>'(objectclass=*)');


$mesg->code && die $mesg->error;

foreach $entry ($mesg->all_entries) { $entry->dump; }

$ldap->unbind;   # take down session

Reply via email to