* Quanah Gibson-Mount <[EMAIL PROTECTED]> [20050323 20:10]: > > After testing, I have to say "works" is a loose term. On linux at least, > it segfaults on me when doing GSSAPI binds. It doesn't segfault when doing > the same things with an anonymous bind. >
Segfaults? That's interesting, I haven't had any trouble with it. How did you try to bind? I've been using something like this: #!/usr/bin/perl -w use Net::LDAP; use Authen::SASL; use strict; my $ldapserver = 'servername'; my $ldapport = '389'; my $ldapbase = "dc=foo,dc=bar"; my $sasl = Authen::SASL->new( mechanism => 'GSSAPI', callback => { 'user' => sub {''} , 'password' => sub {''}, }, ); my $ldap = Net::LDAP->new ($ldapserver, port => $ldapport, version => 3) or die "LDAP error: [EMAIL PROTECTED]"; # initialize TLS or bail my $result = $ldap->start_tls(); die $result->error() if $result->code(); my $msg = $ldap->bind( "", sasl => $sasl ,version => 3); $msg->code && die "[",$msg->code(), "] ", $msg->error; $msg = $ldap->search( base => "$ldapbase", scope => "sub", # exact match on uid or substring match on cn filter => "(|(uid=$ARGV[0])(cn=*$ARGV[0]*))" ); if ( $msg->count() > 0 ) { print $msg->count(), " entries returned.\n"; foreach my $entry ( $msg->all_entries() ) { $entry->dump(); } }