Skip Menu |
 

This queue is for tickets about the Authen-SASL CPAN distribution.

Report information
The Basics
Id: 85294
Status: open
Priority: 0/
Queue: Authen-SASL

People
Owner: Nobody in particular
Requestors: huck [...] spawar.navy.mil
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: SASL & GSSAPI error
Date: Tue, 14 May 2013 14:03:34 -0400
To: bug-Authen-SASL [...] rt.cpan.org
From: Craig Huckabee <huck [...] spawar.navy.mil>
Download (untitled) / with headers
text/plain 1.4k
platform: RHEL6 x86_64 When using GSSAPI/SASL with Net::LDAP to perform a simple search on RHEL6 x86_64, we get an error: substr outside of string at /usr/share/perl5/Authen/SASL/Perl.pm line 284, <DATA> line 522. This happens with the RedHat supplied Authen::SASL rpm as well as with Authen::SASL 2.16 built from CPAN. Target LDAP server shows the connection being made and the search being run. Short example script that displays the error: run kinit to get Kerberos credentials, then run: #!/usr/bin/perl use strict; use warnings; use Net::LDAP; use Authen::SASL; my $ldapbase = "dc=bar,dc=com"; my ( $name ) = @ARGV ; print $name , "\n"; my $sasl = Authen::SASL->new(mechanism => 'GSSAPI' ) || die "$@"; my $ldap = Net::LDAP->new('myldap.bar.com') || die "$@"; my $msg = $ldap->bind( sasl => $sasl ); ldap_search($name); sub ldap_search { my ( $search ) = @_; $msg = $ldap->search( base => $ldapbase, scope => "sub", filter => "(|(uid=*$search*)(cn=*$search*))", attr => ["uid"], ); my %ldap_users; for my $entry ( $msg->entries) { my $uid = $entry->get_value( 'uid' ); $ldap_users{$uid} = $uid; } return %ldap_users; } Example output: [root@ds-test huck]# ./testkrb.pl test test substr outside of string at /usr/share/perl5/Authen/SASL/Perl.pm line 284, <DATA> line 522.
Download smime.p7s
application/pkcs7-signature 4.6k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #85294] SASL & GSSAPI error
Date: Tue, 14 May 2013 13:34:54 -0500
To: bug-Authen-SASL [...] rt.cpan.org
From: Graham Barr <gbarr [...] pobox.com>
Download (untitled) / with headers
text/plain 492b
Show quoted text
> [root@ds-test huck]# ./testkrb.pl test > test > substr outside of string at /usr/share/perl5/Authen/SASL/Perl.pm line > 284, <DATA> line 522.
Thats odd, line 284 in Authen/SASL/Perl.pm is a comment 280: my $debug = $self->{conn}->{debug}; 281: my $fh = $self->{fh}; 282: my $buf = ''; 283: 284: # first, read 4-octet buffer size 285: my $n = 0; 286: while ($n < 4) { 287: my $rv = sysread($fh, $buf, 4 - $n, $n); Has your Perl.pm been modified? Graham.
Subject: Re: [rt.cpan.org #85294] SASL & GSSAPI error
Date: Tue, 14 May 2013 14:40:16 -0400
To: bug-Authen-SASL [...] rt.cpan.org
From: Craig Huckabee <huck [...] spawar.navy.mil>
Download (untitled) / with headers
text/plain 754b
Sorry, that is the output from the RedHat supplied module. Let me get you the output from the CPAN compiled module. On 5/14/13 2:35 PM, Graham Barr via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=85294 > >
>> [root@ds-test huck]# ./testkrb.pl test >> test >> substr outside of string at /usr/share/perl5/Authen/SASL/Perl.pm line >> 284, <DATA> line 522.
> > Thats odd, line 284 in Authen/SASL/Perl.pm is a comment > > 280: my $debug = $self->{conn}->{debug}; > 281: my $fh = $self->{fh}; > 282: my $buf = ''; > 283: > 284: # first, read 4-octet buffer size > 285: my $n = 0; > 286: while ($n < 4) { > 287: my $rv = sysread($fh, $buf, 4 - $n, $n); > > Has your Perl.pm been modified? > > Graham. > >
Download smime.p7s
application/pkcs7-signature 4.6k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #85294] SASL & GSSAPI error
Date: Tue, 14 May 2013 14:43:41 -0400
To: bug-Authen-SASL [...] rt.cpan.org
From: Craig Huckabee <huck [...] spawar.navy.mil>
Download (untitled) / with headers
text/plain 997b
Here is the output when the module straight from CPAN is used: substr outside of string at /usr/local/share/perl5/Authen/SASL/Perl.pm line 333, <DATA> line 747. On 5/14/13 2:40 PM, Craig Huckabee wrote: Show quoted text
> > Sorry, that is the output from the RedHat supplied module. Let me get > you the output from the CPAN compiled module. > > > On 5/14/13 2:35 PM, Graham Barr via RT wrote:
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=85294 > >>
>>> [root@ds-test huck]# ./testkrb.pl test >>> test >>> substr outside of string at /usr/share/perl5/Authen/SASL/Perl.pm line >>> 284, <DATA> line 522.
>> >> Thats odd, line 284 in Authen/SASL/Perl.pm is a comment >> >> 280: my $debug = $self->{conn}->{debug}; >> 281: my $fh = $self->{fh}; >> 282: my $buf = ''; >> 283: >> 284: # first, read 4-octet buffer size >> 285: my $n = 0; >> 286: while ($n < 4) { >> 287: my $rv = sysread($fh, $buf, 4 - $n, $n); >> >> Has your Perl.pm been modified? >> >> Graham. >> >>
> >
Download smime.p7s
application/pkcs7-signature 4.6k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #85294] SASL & GSSAPI error
Date: Tue, 14 May 2013 14:03:13 -0500
To: bug-Authen-SASL [...] rt.cpan.org
From: Graham Barr <gbarr [...] pobox.com>
Download (untitled) / with headers
text/plain 548b
Ah, OK I think I see the issue. unfortunately I cannot test GSSAPI right now. Can you add the following on line 325 and re-test $len = length($_[1]) if $len > length($_[1]); Graham. On May 14, 2013, at 13:44 , Craig Huckabee via RT <bug-Authen-SASL@rt.cpan.org> wrote: Show quoted text
> Queue: Authen-SASL > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=85294 > > > > Here is the output when the module straight from CPAN is used: > > substr outside of string at /usr/local/share/perl5/Authen/SASL/Perl.pm > line 333, <DATA> line 747.
Subject: Re: [rt.cpan.org #85294] SASL & GSSAPI error
Date: Tue, 14 May 2013 15:12:05 -0400
To: bug-Authen-SASL [...] rt.cpan.org
From: Craig Huckabee <huck [...] spawar.navy.mil>
Download (untitled) / with headers
text/plain 699b
That works! On 5/14/13 3:03 PM, Graham Barr via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=85294 > > > Ah, OK I think I see the issue. > > unfortunately I cannot test GSSAPI right now. > > Can you add the following on line 325 and re-test > > $len = length($_[1]) if $len > length($_[1]); > > Graham. > > On May 14, 2013, at 13:44 , Craig Huckabee via RT <bug-Authen-SASL@rt.cpan.org> wrote: >
>> Queue: Authen-SASL >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=85294 > >> >> >> Here is the output when the module straight from CPAN is used: >> >> substr outside of string at /usr/local/share/perl5/Authen/SASL/Perl.pm >> line 333, <DATA> line 747.
> >
Download smime.p7s
application/pkcs7-signature 4.6k

Message body not shown because it is not plain text.



This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.