--On Thursday, March 24, 2005 10:50 AM -0800 Ben Poliakoff <[EMAIL PROTECTED]> wrote:

* Quanah Gibson-Mount <[EMAIL PROTECTED]> [20050324 10:27]:

Hm, mine is:

# !/usr/local/bin/perl -w
use Net::LDAP;
use MIME::Base64;
use Authen::SASL;
use Socket;

$server='ldap.stanford.edu';
my $name = gethostbyaddr(inet_aton($server), AF_INET);

my $ldap = Net::LDAP->new($name, version=>3) || die "$@";

my $slavesasl = Authen::SASL->new(mechanism=>'GSSAPI');
my $mesg = $ldap->bind("", sasl=>$slavesasl);

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

$mesg =
$ldap->search(async=>1,filter=>"(uid=quanah)",base=>"dc=stanford,dc=edu"
);

@entries = $mesg->entries;

foreach $entry (@entries) {
    $entry->dump;
}


You shouldn't have to initialize the callbacks at all by default (just a note).

Your code (w/o the callbacks) didn't work for me either. But the following modification made it work for me:

    12c12,19
    < my $slavesasl = Authen::SASL->new(mechanism=>'GSSAPI');
    ---
    > my $slavesasl = Authen::SASL->new(
    >           mechanism=>'GSSAPI',
    >           callback => {
    >               'user' => sub {''},
    >               'password' => sub {''},
    >               },
    > );
    >

Okay, then Mark Adamson's code is still buggy, I'll stick with Patrick's stuff. I wish Mark would just fix his module up with Patrick's fixes.


--Quanah


-- Quanah Gibson-Mount Principal Software Developer ITSS/Shared Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html

"These censorship operations against schools and libraries are stronger
than ever in the present religio-political climate. They often focus on
fantasy and sf books, which foster that deadly enemy to bigotry and blind
faith, the imagination." -- Ursula K. Le Guin



Reply via email to