logo       

Re: Authen::SASL::Cyrus and Net::LDAP: msg#00042

Subject: Re: Authen::SASL::Cyrus and Net::LDAP
On Thu, 8 Jul 2004, Quanah Gibson-Mount wrote:

> --On Thursday, July 08, 2004 4:50 PM -0700 Larry Lile 
> <lile@xxxxxxxxxxxxxxxxxxx> wrote:
> 
> compiled against.
> >
> > Right.  But my question goes more to the fact that Net::LDAP.pm calls
> >
> >     $sasl_conn->property(
> >       sockname => $ldap->{net_ldap_socket}->sockname,
> >       peername => $ldap->{net_ldap_socket}->peername,
> >     );
> >
> > That seems correct for SASLv1, but not for SASLv2.  Net::LDAP is
> > unaware of the SASL version.
> >
> > So should Net::LDAP be aware of the SASL version and call
> > something like this when the SASL version is 2?
> >
> >     $sasl_conn->property(
> >       iplocalport => $ldap->{net_ldap_host},
> >       ipremoteport => $ldap->{net_ldap_peer}),
> >     );
> 
> No, Net::LDAP doesn't need to be aware about the SASL bits at all.
> 
> You are confusing the sockname from SASL v1 with the internal sockname 
> defined inside of Cyrus.so, which is created from the Cyrus.xs file from 
> Authen::SASL::Cyrus (Patrick's version), which defines sockname based on 
> the version of SASL, so that Net::LDAP doesn't have to have this knowledge.

I understand what you are saying.  Patrick added sockname and peername
compatibility into Authen::SASL::Cyrus so Net::LDAP wouldn't have to be
changed.  He then pushes the sockname through inet_ntoa producing the
dotted decimal notation of the address.

I'm saying that I don't know if that is the right thing to do to fix
the problem.

In any case, Patrick's version or modifying Mark's code from CPAN
produces the same result.

CPAN:
Use of uninitialized value in print at 
/opt/perl/lib/site_perl/5.8.4/i686-linux/Authen/SASL/Cyrus/Security.pm 
line 99, <DATA> line 283.
[ ... hang ... ]

Patrick's version:
Use of uninitialized value in print at 
/opt/perl/lib/site_perl/5.8.4/i686-linux/Authen/SASL/Cyrus/Security.pm 
line 81, <DATA> line 283.
[ ... hang ...]

Which apears to be an encoding failure

sub WRITE {
  my($ref,$string,$len) = @_;
  my($fh, $clearbuf, $cryptbuf);
                                                                                
           
  $fh = $ref->{fh};
  $clearbuf = substr($string, 0, $len);
  $cryptbuf = $ref->{conn}->encode($clearbuf);
  print $fh $cryptbuf;
}

Which is the same in both code sets.

-- 
Larry




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe