--On Thursday, July 08, 2004 11:54 AM -0700 Larry Lile <[EMAIL PROTECTED]> wrote:
Larry,
1) Mark Adamson's implementation of Authen::Cyrus::SASL is horribly broken. Why he ignore's Patrick's updated, which were submitted to him on multiple occasions is beyond me, but that's how it is. Don't use Mark's implementation with Cyrus-SASL v2.
2) I neither write nor maintain any of these things. I simply pointed you to what worked for me. If it doesn't work for you, it suggests to me there are other issues with your system that need resolving.
3) IIRC, the sockname error you are seeing happens when you mix cyrus-sasl v1 and cyrus-sasl v2.
4) Nothing you've reported indicates there is an error with Net::LDAP to me.
5) Again, the following works for me:
1) Perl 5.6.1 (I can poke at putting 5.8.x somewhere)
2) Net::LDAP 0.31 with SASL patch from 0.32
--- perl-ldap-0.31/lib/Net/LDAP.pm.orig 2004-01-01 02:38:27.000000000 -0800
+++ perl-ldap-0.31/lib/Net/LDAP.pm 2004-06-11 07:40:19.410972000 -0700
@@ -328,9 +328,6 @@
if $ldap->{net_ldap_version} < 3;
my $sasl = $passwd;
- # Tell the SASL object our user identifier
- $sasl->callback( user => "dn: $stash{name}")
- unless $sasl->callback('user'); my $sasl_conn = $sasl->client_new("ldap",$ldap->{net_ldap_host});3) Authen::SASL 2.07
4) Patrick's excellent implementation of Authen::Cyrus::SASL, which I pointed you at before. Attempting to use Mark's version is a pointless exercise.
If you have any more questions, please leave me out of it.
Regards, Quanah
I seem unable to find any combination of Authen::SASL::Cyrus and Net::LDAP that work together. After googling around the net for several days it seems this is a fairly common problem.
Can we work through this, I can't imagine that it's that big of a problem. I just don't have enough knowledge of sasl and perl XS to fix it myself.
Here is a quick example...
bass [~/ncvs/systems/led](SHARK)(48)> cat test # !/opt/perl/bin/perl -w use Net::LDAP; use Authen::SASL;
my $ldap = Net::LDAP->new("mooney.anim.dreamworks.com", version=>3) || die "$@";
my $slavesasl = Authen::SASL->new(mechanism=>'GSSAPI'); my $mesg = $ldap->bind("uid=lile,ou=people,dc=anim,dc=dreamworks,dc=com", sasl=>$slavesasl); $mesg->code && die $mesg->error;
$mesg = $ldap- >search(filter=>"(uid=lile)",base=>"dc=anim,dc=dreamworks,dc=com"); $mesg->code && die $mesg->error;
@entries = $mesg->entries;
$entry = shift (@entries); $uid = ($entry->get_value("uid")); print "uid $uid\n"; bass [~/ncvs/systems/led](SHARK)(49)> ./test Unknown SASL property: 'sockname' (user|ssf|maxout|realm|optctx|iplocalport|ipremoteport|service|serverfqd n|authsource|mechname|authuser)
All of the perl modules were compiled today from CPAN.
PERLLOCAL(1) User Contributed Perl Documentation PERLLOCAL(1) Thu Jul 8 10:50:20 2004: "Module" Convert::ASN1 o "installed into: /opt/perl/lib/site_perl/5.8.4" o "LINKTYPE: dynamic" o "VERSION: 0.18" o "EXE_FILES: " Thu Jul 8 10:50:23 2004: "Module" URI o "installed into: /opt/perl/lib/site_perl/5.8.4" o "LINKTYPE: dynamic" o "VERSION: 1.31" o "EXE_FILES: " Thu Jul 8 10:50:31 2004: "Module" XML::Parser o "installed into: /opt/perl/lib/site_perl/5.8.4" o "LINKTYPE: dynamic" o "VERSION: 2.34" o "EXE_FILES: " Thu Jul 8 10:50:42 2004: "Module" ExtUtils::AutoInstall o "installed into: /opt/perl/lib/site_perl/5.8.4" o "LINKTYPE: dynamic" o "VERSION: 0.59" o "EXE_FILES: " Thu Jul 8 10:50:51 2004: "Module" Authen::SASL o "installed into: /opt/perl/lib/site_perl/5.8.4" o "LINKTYPE: dynamic" o "VERSION: 2.08" o "EXE_FILES: " Thu Jul 8 10:50:53 2004: "Module" XML::SAX::Base o "installed into: /opt/perl/lib/site_perl/5.8.4" o "LINKTYPE: dynamic" o "VERSION: 1.02" o "EXE_FILES: " Thu Jul 8 10:52:02 2004: "Module" Net::SSLeay o "installed into: /opt/perl/lib/site_perl/5.8.4" o "LINKTYPE: dynamic" o "VERSION: 1.25" o "EXE_FILES: " Thu Jul 8 10:52:10 2004: "Module" IO::Socket::SSL o "installed into: /opt/perl/lib/site_perl/5.8.4" o "LINKTYPE: dynamic" o "VERSION: 0.96" o "EXE_FILES: " Thu Jul 8 10:52:39 2004: "Module" Net::LDAP o "installed into: /opt/perl/lib/site_perl/5.8.4" o "LINKTYPE: dynamic" o "VERSION: 0.32" o "EXE_FILES: " Thu Jul 8 10:53:17 2004: "Module" Authen::SASL::Cyrus o "installed into: /opt/perl/lib/site_perl/5.8.4" o "LINKTYPE: dynamic" o "VERSION: 0.11" o "EXE_FILES: " perl v5.8.4 2004-07-08 PERLLOCAL(1)
Thanks!
-- Larry
-- Quanah Gibson-Mount Principal Software Developer ITSS/Shared Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
