Hello community, here is the log from the commit of package perl-Authen-SASL-Cyrus for openSUSE:Factory checked in at 2011-11-21 12:35:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Authen-SASL-Cyrus (Old) and /work/SRC/openSUSE:Factory/.perl-Authen-SASL-Cyrus.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Authen-SASL-Cyrus", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Authen-SASL-Cyrus/perl-Authen-SASL-Cyrus.changes 2011-09-23 12:35:59.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Authen-SASL-Cyrus.new/perl-Authen-SASL-Cyrus.changes 2011-11-21 12:36:15.000000000 +0100 @@ -1,0 +2,7 @@ +Sat Nov 19 20:27:09 UTC 2011 - [email protected] + +- update to 0.13 + Updated the WRITE() method to use syswrite() and account for + variable buffer sizes in SASL + +------------------------------------------------------------------- Old: ---- Authen-SASL-Cyrus-0.12.tar.gz New: ---- Authen-SASL-Cyrus-0.13.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Authen-SASL-Cyrus.spec ++++++ --- /var/tmp/diff_new_pack.lwj7fw/_old 2011-11-21 12:36:17.000000000 +0100 +++ /var/tmp/diff_new_pack.lwj7fw/_new 2011-11-21 12:36:17.000000000 +0100 @@ -1,7 +1,7 @@ # -# spec file for package perl-Authen-SASL-Cyrus (Version 0.12) +# spec file for package perl-Authen-SASL-Cyrus # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,16 +20,15 @@ Name: perl-Authen-SASL-Cyrus BuildRequires: cyrus-sasl-devel perl-Authen-SASL perl-macros -Version: 0.12 -Release: 184 +Version: 0.13 +Release: 0 Requires: perl-Authen-SASL -AutoReqProv: on Group: Development/Libraries/Perl License: Artistic ; GPLv2+ Url: http://www.cpan.org/modules/by-module/Authen/ Summary: SASL Authentication Framework - Cyrus Plugin Source0: http://www.cpan.org/modules/by-module/Authen/Authen-SASL-Cyrus-%{version}.tar.gz -Patch0: Authen-SASL-Cyrus-%{version}.dif +Patch0: Authen-SASL-Cyrus-0.12.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build %{perl_requires} @@ -45,12 +44,6 @@ to perform SASL client connection functionality, including loading existing shared library mechanisms. - - -Authors: --------- - Mark Adamson <[email protected]> - %prep %setup -n Authen-SASL-Cyrus-%{version} %patch0 -p0 @@ -65,9 +58,6 @@ make DESTDIR=$RPM_BUILD_ROOT install_vendor %perl_process_packlist -%clean -#rm -rf $RPM_BUILD_ROOT - %files %defattr(-, root, root) %doc CHANGES ++++++ Authen-SASL-Cyrus-0.12.tar.gz -> Authen-SASL-Cyrus-0.13.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Authen-SASL-Cyrus-0.12/CHANGES new/Authen-SASL-Cyrus-0.13/CHANGES --- old/Authen-SASL-Cyrus-0.12/CHANGES 2004-12-20 22:07:45.000000000 +0100 +++ new/Authen-SASL-Cyrus-0.13/CHANGES 2011-09-15 23:19:03.000000000 +0200 @@ -1,5 +1,9 @@ History of updates to Authen::SASL::Cyrus +0.13 +Updated the WRITE() method to use syswrite() and account for +variable buffer sizes in SASL. + 0.12 Made Cyrus.xs more compatible with Perl API by changing function calls like Perl_warn() to just warn(), and defining PERL_NO_GET_CONTEXT. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Authen-SASL-Cyrus-0.12/Cyrus.pm new/Authen-SASL-Cyrus-0.13/Cyrus.pm --- old/Authen-SASL-Cyrus-0.12/Cyrus.pm 2004-12-17 21:37:02.000000000 +0100 +++ new/Authen-SASL-Cyrus-0.13/Cyrus.pm 2011-09-16 15:34:32.000000000 +0200 @@ -2,7 +2,7 @@ require DynaLoader; require Authen::SASL::Cyrus::Security; @ISA = qw(DynaLoader); -$VERSION = "0.12"; +$VERSION = "0.13"; bootstrap Authen::SASL::Cyrus $VERSION; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Authen-SASL-Cyrus-0.12/MANIFEST new/Authen-SASL-Cyrus-0.13/MANIFEST --- old/Authen-SASL-Cyrus-0.12/MANIFEST 2004-05-07 20:08:17.000000000 +0200 +++ new/Authen-SASL-Cyrus-0.13/MANIFEST 2011-09-16 15:53:58.000000000 +0200 @@ -9,3 +9,4 @@ t/basic.t t/callback.t t/user.t +META.yml Module meta-data (added by MakeMaker) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Authen-SASL-Cyrus-0.12/META.yml new/Authen-SASL-Cyrus-0.13/META.yml --- old/Authen-SASL-Cyrus-0.12/META.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/Authen-SASL-Cyrus-0.13/META.yml 2011-09-16 15:53:58.000000000 +0200 @@ -0,0 +1,21 @@ +--- #YAML:1.0 +name: Authen-SASL-Cyrus +version: 0.13 +abstract: ~ +author: [] +license: unknown +distribution_type: module +configure_requires: + ExtUtils::MakeMaker: 0 +build_requires: + ExtUtils::MakeMaker: 0 +requires: + Authen::SASL: 0 +no_index: + directory: + - t + - inc +generated_by: ExtUtils::MakeMaker version 6.56 +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: 1.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Authen-SASL-Cyrus-0.12/lib/Authen/SASL/Cyrus/Security.pm new/Authen-SASL-Cyrus-0.13/lib/Authen/SASL/Cyrus/Security.pm --- old/Authen-SASL-Cyrus-0.12/lib/Authen/SASL/Cyrus/Security.pm 2004-05-07 20:08:17.000000000 +0200 +++ new/Authen-SASL-Cyrus-0.13/lib/Authen/SASL/Cyrus/Security.pm 2011-09-15 22:09:37.000000000 +0200 @@ -90,13 +90,40 @@ # Encrypting a write() to a filehandle is much easier than reading, because # all the data to be encrypted is immediately available sub WRITE { - my($ref,$string,$len) = @_; - my($fh, $clearbuf, $cryptbuf); + my($ref,$string,$clearSize) = @_; - $fh = $ref->{fh}; - $clearbuf = substr($string, 0, $len); - $cryptbuf = $ref->{conn}->encode($clearbuf); - print $fh $cryptbuf; + my $fh = $ref->{fh}; + + # Divide the entire cleartext into chunks that SASL can encrypt + my $maxChunkSize = $ref->{conn}->property("maxout"); + $maxChunkSize = $clearSize if (! defined $maxChunkSize); + my $clearOffset = 0; + while ($clearOffset < $clearSize) { + my $chunkSize = $clearSize - $clearOffset; + if ($chunkSize > $maxChunkSize) { + $chunkSize = $maxChunkSize; + } + my $clearbuf = substr($string, $clearOffset, $chunkSize); + + # Encrypt the next chunk + my $cryptbuf = $ref->{conn}->encode($clearbuf); + my $cryptSize = length($cryptbuf); + last if (($ref->{conn}->code != 0) || ($cryptSize == 0)); + + # Send the crypt text in however many syswrite() ops it takes + my $cryptOffset = 0; + while ($cryptOffset < $cryptSize) { + my $n = syswrite($fh, $cryptbuf, $cryptSize - $cryptOffset, $cryptOffset); + last if ($n <= 0); + $cryptOffset += $n; + } + last if ($cryptOffset < $cryptSize); + + $clearOffset += $chunkSize; + } + + # Return the number of CLEARTEXT bytes sent, not encrypted bytes + return $clearOffset; } -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
