[EMAIL PROTECTED] /tmp]# cat test.pl #!/usr/local/bin/perl -w use Net::LDAP; use MIME::Base64; use Authen::SASL; use Socket;
$server='ldap.cs.umd.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("uid=derek,ou=people,dc=cs,dc=umd,dc=edu", sasl=>$slavesasl);
$mesg->code && die $mesg->error;
$mesg = $ldap->search(async=>1,filter=>"(uid=derek)",base=>"dc=cs, dc=umd,dc=edu");
@entries = $mesg->entries;
$entry = shift (@entries);
$uid = ($entry->get_value("uid"));
print "uid $uid\n";
[EMAIL PROTECTED] /tmp]# ./test.pl
/usr/local/bin/perl: relocation error: /usr/local/perl-5.8.2/lib/ site_perl/5.8.2/i686-linux/auto/Authen/SASL/Cyrus/Cyrus.so: undefined symbol: sasl_client_init
[EMAIL PROTECTED] /tmp]# ldd /usr/local/perl-5.8.2/lib/site_perl/5.8.2/i686- linux/auto/Authen/SASL/Cyrus/Cyrus.so
libc.so.6 => /lib/tls/libc.so.6 (0xb74aa000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
On 08/23/2004 02:40:18 PM, Quanah Gibson-Mount wrote:
--On Monday, August 23, 2004 6:30 PM +0000 "Derek T. Yarnell" <[EMAIL PROTECTED]> wrote:
RHEL3 WS box with own version of perl 5.8.2 in /usr/local/perl-5.8.2
What version of Net::LDAP?
0.32
What version of Authen::SASL?
2.08
What version of cyrus-sasl?
[EMAIL PROTECTED] Authen]# rpm -qa | grep cyrus cyrus-sasl-md5-2.1.15-8 cyrus-sasl-gssapi-2.1.15-8 cyrus-sasl-devel-2.1.15-8 cyrus-sasl-plain-2.1.15-8 cyrus-sasl-2.1.15-8
I have installed the broken Authen::Cyrus::SASL and then read the archives and installed Patrick's version. But I am a bit confused.
The only thing that has worked for me, is the latest Net::LDAP, with
the latest Authen::SASL, with cyrus-sasl-2.1.18 or later, with the
Authen::Cyrus::SASL that is maintained by Patrick, and *not* the one
that is on CPAN, which won't even compile out of the box against
cyrus-sasl2.
What code works for you? The docs are bit thin on this, atleast the creation of the sasl object.
#!/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("uid=quanah,cn=accounts,dc=stanford,dc=edu", sasl=>$slavesasl);
$mesg->code && die $mesg->error;
$mesg = $ldap->search(async=>1,filter=>"(uid=quanah)", base=>"dc=stanford,dc=edu");
@entries = $mesg->entries;
$entry = shift (@entries); $uid = ($entry->get_value("uid")); print "uid $uid\n";
--Quanah
-- Quanah Gibson-Mount Principal Software Developer ITSS/Shared Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
-- Derek T. Yarnell UNIX System Administrator Computer Science Deparment University of Maryland
