debian/0000755000000000000000000000000012231164632007166 5ustar debian/watch0000644000000000000000000000055511534575051010232 0ustar version=3 # Attention: # search.cpan.org and www.cpan.org have the non-server version, which # doesn't provide all interesting APIs and which has some other bugs. # We intentionally package this one instead. # in other words: don't use # http://search.cpan.org/dist/Authen-SASL-Cyrus/ http://www.cpan.org/authors/id/P/PB/PBOETTCH/Authen-SASL-Cyrus-(.*)\.tar\.gz debian/rules0000755000000000000000000000056711534630367010266 0ustar #!/usr/bin/make -f # Set the user environment variable required by the test suite. export USER=testuser PACKAGE := $(shell dh_listpackages) override_dh_auto_configure: dh_auto_configure -- LIBS="-lsasl2" DEFINE="-DSASL2" override_dh_auto_test: dh_auto_test override_dh_fixperms: chmod 644 debian/$(PACKAGE)/usr/lib/perl5/Authen/SASL/Cyrus.pod dh_fixperms %: dh $@ debian/copyright0000644000000000000000000000362211534576317011140 0ustar Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=166 Upstream-Contact: Patrick Boettcher Source: http://www.cpan.org/authors/id/P/PB/PBOETTCH/ Upstream-Name: Authen-SASL-Cyrus Files: * Copyright: 2003 Carnegie Mellon University. All rights reserved. 2003-5 Patrick Boettcher, DESY Zeuthen. All rights reserved. License: Artistic or GPL-1+ Files: debian/* Copyright: 2001, Graeme Mathieson 2002, Ben Burton 2002, Graeme Mathieson 2003, Mark Brown 2003, Stephen Zander 2004-2011, The Board of Trustees of the Leland Stanford Junior University 2005, Stephen Quinney 2008, Damyan Ivanov License: Artistic or GPL-1+ Comment: Changes by Graeme Mathieson, Stephen Zander, and Stephen Quinney did not have explicit copyright statements. See the Debian changelog for the dates of changes. Presumably all their changes may be redistributed under the same terms as Authen::SASL::Cyrus itself. Changes by Russ Allbery are copyright The Board of Trustees of the Leland Stanford Junior University and released under the same license as the upstream distribution. License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. . On Debian systems, the complete text of the Artistic License can be found in /usr/share/common-licenses/Artistic. License: GPL-1+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. . On Debian systems, the complete text of version 1 of the GNU General Public License can be found in /usr/share/common-licenses/GPL-1. debian/docs0000644000000000000000000000000711534575051010044 0ustar README debian/source/0000755000000000000000000000000011534630446010474 5ustar debian/source/format0000644000000000000000000000001411534575172011706 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000011534630446010623 5ustar debian/patches/numeric-version0000644000000000000000000000107711534577540013705 0ustar Author: Russ Allbery Description: Change version number to be numeric Change the version number from 0.13-server to 0.13.1 so that it's numeric. Perl warns (in 5.10) and fails (in 5.12) with the previous non-numeric version. --- libauthen-sasl-cyrus-perl.orig/Cyrus.pm +++ libauthen-sasl-cyrus-perl/Cyrus.pm @@ -5,7 +5,9 @@ @ISA = qw(DynaLoader);# Exporter); -$VERSION = "0.13-server"; +# Modified for Debian from 0.13-server to avoid Perl 5.12 problems with +# non-numeric versions. +$VERSION = "0.13.1"; bootstrap Authen::SASL::Cyrus $VERSION; debian/patches/encode-no-more-than-MAX_OUTBUF0000644000000000000000000000227011534575051016015 0ustar SASL may impose limitations on the maximum buffer size that can be encoded using the SASL privacy layer. Honor that properly and encode data in chunks of at most SASL_MAXOUTBUF in length. --- a/lib/Authen/SASL/Cyrus/Security.pm +++ b/lib/Authen/SASL/Cyrus/Security.pm @@ -73,11 +73,27 @@ sub READ { # all the data to be encrypted is immediately available sub WRITE { my($ref,$string,$len) = @_; - my($fh, $clearbuf, $cryptbuf); + my($fh, $clearbuf, $cryptbuf, $maxbuf); $fh = $ref->{fh}; $clearbuf = substr($string, 0, $len); - $cryptbuf = $ref->{conn}->encode($clearbuf); + $maxbuf = $ref->{conn}->property("maxout"); + if ($len < $maxbuf) { + $cryptbuf = $ref->{conn}->encode($clearbuf); + return(-1) if not defined ($cryptbuf); + } else { + my ($partial, $chunk, $chunksize); + my $offset = 0; + $cryptbuf = ''; + while ($offset < $len) { + $chunksize = (($offset + $maxbuf) > $len) ? $len - $offset : $maxbuf; + $chunk = substr($clearbuf, $offset, $chunksize); + $partial = $ref->{conn}->encode($chunk); + return(-1) if not defined ($partial); + $cryptbuf .= $partial; + $offset += $chunksize; + } + } print $fh $cryptbuf; } debian/patches/test-warnings0000644000000000000000000000144311534620104013343 0ustar Author: Russ Allbery Description: Use warn to report test error messages Use warn rather than print to report error messages from client or server negotiation. print is swallowed by the test harness. --- libauthen-sasl-cyrus-perl.orig/t/plain.t +++ libauthen-sasl-cyrus-perl/t/plain.t @@ -50,7 +50,7 @@ print "Server: Test successful Negotiation succeeded.\n"; } else { ok(0); - print "Server: Negotiation failed.\n",$conn->error(),"\n"; + warn "Server: Negotiation failed.\n",$conn->error(),"\n"; } close FROM_CLIENT; @@ -82,7 +82,7 @@ if ($conn->code == 0) { print "Client: Negotiation succeeded.\n"; } else { - print "Client: Negotiation failed.\n",$conn->error,"\n"; + warn "Client: Negotiation failed.\n",$conn->error,"\n"; } close FROM_PARENT; debian/patches/generate-man-pages0000644000000000000000000000160211534605614014204 0ustar Author: Russ Allbery Description: Install the Authen::SASL::Cyrus man page The man page wasn't being installed due to an upstream override of the manifypods rule, which dropped the part of the rule that actually created the man page. Fix this by including the inherited text in the rule override. --- libauthen-sasl-cyrus-perl.orig/Makefile.PL +++ libauthen-sasl-cyrus-perl/Makefile.PL @@ -16,12 +16,12 @@ package MY; sub manifypods { - return <<'POD'; -manifypods: Cyrus.pod - + my $inherited = shift->SUPER::manifypods(@_); + return <<"POD"; +$inherited Cyrus.pod: Cyrus.xs - @echo "!!! Developers: Do not edit the Cyrus.pod, edit the Cyrus.xs instead. !!!" - @echo "Make will overwrite Cyrus.pod." + \@echo "!!! Developers: Do not edit the Cyrus.pod, edit the Cyrus.xs instead. !!!" + \@echo "Make will overwrite Cyrus.pod." podselect Cyrus.xs > Cyrus.pod POD } debian/patches/correct-write-return-value0000644000000000000000000000154411534575051015772 0ustar Perl's print function returns true, not the number of octets printed, but when overloading WRITE in a tied file handle, we must return the number of octets written or -1 on error. Adjust the return value of WRITE accordingly. Patch from Sergio Gelato Debian Bug#486698. --- libauthen-sasl-cyrus-perl.orig/lib/Authen/SASL/Cyrus/Security.pm +++ libauthen-sasl-cyrus-perl/lib/Authen/SASL/Cyrus/Security.pm @@ -77,6 +77,7 @@ $fh = $ref->{fh}; $clearbuf = substr($string, 0, $len); + $len = length($clearbuf); $maxbuf = $ref->{conn}->property("maxout"); if ($len < $maxbuf) { $cryptbuf = $ref->{conn}->encode($clearbuf); @@ -94,7 +95,7 @@ $offset += $chunksize; } } - print $fh $cryptbuf; + return (print $fh $cryptbuf) ? $len : -1; } # Given a GLOB ref, tie the filehandle of the GLOB to this class debian/patches/fix-pod-errors0000644000000000000000000000226711534606325013434 0ustar Author: Russ Allbery Description: Fix POD syntax and formatting errors The POD documentation uses an unusual method for adding remarks to the middle of an =over/=item list, which in combination with some placement of sentences and the use of podselect confuses Pod::Man. Move things around to achieve the desired result without syntax errors. --- libauthen-sasl-cyrus-perl.orig/Cyrus.xs +++ libauthen-sasl-cyrus-perl/Cyrus.xs @@ -1234,6 +1234,8 @@ name of the server being contacted, which may also be used by the underlying mechanism. +See SYNOPSIS for an example. + =back B: @@ -1247,10 +1249,6 @@ side. Format of this arguments in an IPv4 environment should be: a.b.c.d;port. See sasl_server_new(3) for details. -=over 4 - -See SYNOPSIS for an example. - =cut Authen_SASL_Cyrus @@ -1291,6 +1289,8 @@ =pod +=over 4 + =item server_start ( CHALLENGE ) C begins the authentication using the chosen mechanism. @@ -1439,8 +1439,6 @@ See example below. -=over 4 - =cut @@ -1478,6 +1476,8 @@ =pod +=over 4 + =item listmech( START , SEPARATOR , END ) C returns a string containing all mechanisms allowed for the user debian/patches/series0000644000000000000000000000020611534620004012023 0ustar encode-no-more-than-MAX_OUTBUF correct-write-return-value numeric-version generate-man-pages fix-pod-errors strlen-size test-warnings debian/patches/strlen-size0000644000000000000000000000674511534617711013041 0ustar Author: Russ Allbery Description: Fix type mismatches on 64-bit platforms Change the data types used in the XS code for the module to ensure data types match Perl's expectations on 64-bit platforms. --- libauthen-sasl-cyrus-perl.orig/Cyrus.xs +++ libauthen-sasl-cyrus-perl/Cyrus.xs @@ -195,7 +195,7 @@ This function executes the perl sub/code and returns the result and its length. */ -int PerlCallbackSub (struct _perlcontext *cp, char **result, unsigned *len, AV *args) +int PerlCallbackSub (struct _perlcontext *cp, char **result, Size_t *len, AV *args) { int rc = SASL_OK; @@ -274,7 +274,8 @@ int PerlCallback(void *context, int id, const char **result, unsigned *len) { struct _perlcontext *cp = (struct _perlcontext *) context; - int llen, rc=SASL_OK; + Size_t llen; + int rc=SASL_OK; char *c = NULL; if (id != SASL_CB_USER && @@ -308,7 +309,8 @@ int PerlCallbackRealm ( void *context, int id, const char **availrealms, const char **result) { struct _perlcontext *cp = (struct _perlcontext *) context; - int rc = SASL_OK,i,len; + int rc = SASL_OK,i; + Size_t len; char *c = NULL; AV *args = newAV(); @@ -366,7 +368,8 @@ int PerlCallbackSecret (sasl_conn_t *conn, void *context, int id, sasl_secret_t **psecret) { struct _perlcontext *cp = (struct _perlcontext *) context; - int len,rc = SASL_OK; + int rc = SASL_OK; + Size_t len; char *c = NULL; /* HandlePerlStuff */ @@ -390,7 +393,8 @@ unsigned *out_ulen) { struct _perlcontext *cp = (struct _perlcontext *) context; - int rc = SASL_OK,len; + int rc = SASL_OK; + Size_t len; char *c = NULL; AV *args; @@ -433,7 +437,8 @@ const char *pass, unsigned passlen, struct propctx *propctx) { struct _perlcontext *cp = (struct _perlcontext *) context; - int rc = SASL_OK,len; + int rc = SASL_OK; + Size_t len; char *c = NULL; AV *args = newAV(); @@ -467,7 +472,8 @@ { struct _perlcontext *cp = (struct _perlcontext *) context; AV *args = newAV(); - int rc = SASL_OK, len; + int rc = SASL_OK; + Size_t len; char *c = NULL; _DEBUG("ServerSetPass: %s, %s, %d",user,pass,passlen); @@ -497,7 +503,8 @@ { struct _perlcontext *cp = (struct _perlcontext *) context; AV *args = newAV(); - int rc = SASL_OK,len; + int rc = SASL_OK; + Size_t len; char *c = NULL; _DEBUG("Authorize: %s, %s, %s",auth_identity,requested_user,def_realm); @@ -937,7 +944,7 @@ { char *key; int count=0,i; - long l; + I32 l; #ifndef SASL2 // Missing SASL1 canonuser workaround int canon=-1,auth=-1; @@ -1306,7 +1313,8 @@ const char *instring; PREINIT: int rc; - unsigned outlen,inlen; + Size_t inlen; + unsigned int outlen; #ifdef SASL2 const char *outstring = NULL; #else @@ -1402,7 +1410,8 @@ const char *error=NULL; #endif int rc; - unsigned int inlen, outlen=0; + Size_t inlen; + unsigned int outlen=0; PPCODE: if (sasl->error_code != SASL_CONTINUE) XSRETURN_UNDEF; @@ -1454,7 +1463,8 @@ char *outstring=NULL; #endif int rc; - unsigned int inlen, outlen=0; + Size_t inlen; + unsigned int outlen=0; if (sasl->error_code != SASL_CONTINUE) XSRETURN_UNDEF; @@ -1624,7 +1634,8 @@ char *outstring=NULL; #endif int rc; - unsigned int inlen, outlen=0; + Size_t inlen; + unsigned int outlen=0; if (sasl->error_code) XSRETURN_UNDEF; @@ -1652,7 +1663,8 @@ char *outstring=NULL; #endif int rc; - unsigned int inlen, outlen=0; + Size_t inlen; + unsigned int outlen=0; if (sasl->error_code) XSRETURN_UNDEF; debian/compat0000644000000000000000000000000211534576430010374 0ustar 8 debian/control0000644000000000000000000000207611534577146010613 0ustar Source: libauthen-sasl-cyrus-perl Section: perl Priority: extra Build-Depends: debhelper (>= 8), libauthen-sasl-perl, libsasl2-dev, libsasl2-modules, perl Maintainer: Debian Perl Group Uploaders: Russ Allbery , Damyan Ivanov Standards-Version: 3.9.1 Homepage: http://www.wi-bw.tfh-wildau.de/~pboettch/home/index.php?site=asc Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libauthen-sasl-cyrus-perl/ Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libauthen-sasl-cyrus-perl/ Package: libauthen-sasl-cyrus-perl Architecture: any Depends: ${misc:Depends}, ${perl:Depends}, ${shlibs:Depends}, libauthen-sasl-perl Description: Perl extension for Cyrus SASL library This module provides an Perl interface to the Cyrus implementation of SASL. It works with the existing Authen::SASL implementation, has been tested with Net::LDAP, and provides the GSSAPI authentication layer. . This version of the Authen::SASL::Cyrus includes an interface to the server-side functionality of the SASL library. debian/changelog0000644000000000000000000002172012231164632011042 0ustar libauthen-sasl-cyrus-perl (0.13-server-8build3) trusty; urgency=low * Rebuild for Perl 5.18. -- Colin Watson Mon, 21 Oct 2013 09:45:14 +0100 libauthen-sasl-cyrus-perl (0.13-server-8build2) precise; urgency=low * Rebuild for Perl 5.14. -- Colin Watson Tue, 15 Nov 2011 17:14:07 +0000 libauthen-sasl-cyrus-perl (0.13-server-8build1) oneiric; urgency=low * Rebuild for Perl 5.12. -- Colin Watson Sun, 08 May 2011 07:16:30 +0100 libauthen-sasl-cyrus-perl (0.13-server-8) unstable; urgency=low * Explicitly set USER when running the test suite, since it may not be set in a buildd environment. This fix was accidentally dropped in 0.13-server-6. -- Russ Allbery Sat, 05 Mar 2011 22:56:44 -0800 libauthen-sasl-cyrus-perl (0.13-server-7) unstable; urgency=low * Modify some type declarations in the XS code to ensure that data types match the size that Perl expects on 64-bit platforms. * Modify the test suite to report failures with warn rather than print, so the error message will be visible outside the test framework. -- Russ Allbery Sat, 05 Mar 2011 21:54:26 -0800 libauthen-sasl-cyrus-perl (0.13-server-6) unstable; urgency=low * Change the internal module version to 0.13.1 as a Debian-specific workaround to avoid warnings in Perl 5.10 and more serious problems with Perl 5.12 with non-numeric versions. When upstream releases a new version without the -server suffix, this change can be dropped. (Closes: #578551) * Fix an upstream override of manifypods that suppressed generation of a man page for the module. * Fix syntax errors in the POD documentation previously hidden by our failure to install a manual page. * Update debhelper compatibility level to V8. - Use overrides instead of partial rule implementations. * Change to Debian source format 3.0 (quilt). - Remove now-unnecessary README.source. * Convert debian/copyright to the proposed DEP-5 format. * Update standards version to 3.9.1 (no changes required). -- Russ Allbery Sat, 05 Mar 2011 20:29:00 -0800 libauthen-sasl-cyrus-perl (0.13-server-5) unstable; urgency=low * Add the missing $(QUILT_STAMPFN) dependency to debian/rules so that patches are applied correctly during the build. Thanks, Ben Poliakoff. (Closes: #538296) * Update standards version to 3.8.2 (no changes required). -- Russ Allbery Fri, 24 Jul 2009 10:05:02 -0700 libauthen-sasl-cyrus-perl (0.13-server-4) unstable; urgency=low [ gregor herrmann ] * Add debian/README.source to document quilt usage, as required by Debian Policy since 3.8.0. * debian/control: Changed: Switched Vcs-Browser field to ViewSVN (source stanza). * debian/control: Added: ${misc:Depends} to Depends: field. [ Russ Allbery ] * The tied file handle implementation in Authen::SASL::Cyrus::Security passed along the return value of print in its WRITE implementation. This is always 1, and WRITE is supposed to behave like syswrite and return the number of octets written. Patch from Sergio Gelato. (Closes: #486698) * Remove extraneous *.patch extension from the output encoding patch and add an explanatory introductory comment. * Update to debhelper compatibility level V7. - Use partial debhelper rules minimization. * Update standards version to 3.8.1 (no changes required). -- Russ Allbery Tue, 17 Mar 2009 16:13:08 -0700 libauthen-sasl-cyrus-perl (0.13-server-3) unstable; urgency=low * debian/rules: + move test suitr to build-stamp target + stop setting INSTALLVENDOR* vars, remove usr/share/perl5 if it exists + remove unused dh_link + no need to chmod -R $(CURDIR) in clean * Move the change to Security.pm (encoding data in chunks) to a separate patch. Bring quilt into play * Add myself to Uploaders -- Damyan Ivanov Wed, 16 Jan 2008 15:40:51 +0200 libauthen-sasl-cyrus-perl (0.13-server-2) unstable; urgency=low [ gregor herrmann ] * debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser field (source stanza); Homepage field (source stanza). Removed: Homepage pseudo-field (Description); XS-Vcs-Svn fields. [ Russ Allbery ] * Tell Makefile.PL not to create /usr/share/perl5 and remove the rmdir, which fails with Perl 5.10. * Use DESTDIR rather than PREFIX when installing. * Update standards version to 3.7.3 (no changes required). * Update debhelper compatibility level to V5 (no changes required). * Wrap Build-Depends for readability. -- Russ Allbery Sat, 29 Dec 2007 15:31:53 -0800 libauthen-sasl-cyrus-perl (0.13-server-1) unstable; urgency=low * New upstream release. * Change maintainers to the Debian Perl Group. * Update debian/copyright and debian/watch to point to CPAN rather than the (not updated) home page. * debian/rules cleanup. - Add build-arch and build-indep targets just in case. - Use a better method of optionally running make distclean. - Remove stamp files first in clean target. - Improve target dependencies. * Update standards version to 3.7.2 (no changes required). -- Russ Allbery Sun, 7 May 2006 16:03:50 -0700 libauthen-sasl-cyrus-perl (0.12-server-4) unstable; urgency=low * Encode large amounts of data in chunks of SASL_MAXOUTBUF rather than trying to encode all the data at once. * Providing binary-indep in debian/rules is required by Policy even if there are no arch-independent packages. Whoops. -- Russ Allbery Wed, 7 Dec 2005 12:42:42 -0800 libauthen-sasl-cyrus-perl (0.12-server-3) unstable; urgency=low * Use a better technique for optionally running make realclean. * Remove unused rules in debian/rules. * Reformat debian/copyright and add an explicit copyright and license for the Debian packaging. * Update maintainer address. -- Russ Allbery Sat, 19 Nov 2005 16:30:35 -0800 libauthen-sasl-cyrus-perl (0.12-server-2) unstable; urgency=low * Redo how library data is handled following the recommendations in perlxs(1), eliminating a cast of a pointer through an int and thereby hopefully fixing problems on 64-bit platforms. * Explicitly set USER when running the test suite. The value doesn't matter for the tests, and some package build methods (debuild) strip the environment. * Update standards version to 3.6.2 (no changes required). * Reduce priority to extra again after consultation with ftp-masters. -- Russ Allbery Wed, 29 Jun 2005 17:08:35 -0700 libauthen-sasl-cyrus-perl (0.12-server-1) unstable; urgency=low * Adopt orphaned package. (Closes: #279776) * Acknowledge NMU. (Closes: #250520, #288569) * Switch upstreams to the -server varient maintained by Patrick Boettcher. It implements considerably more of the API and is sufficient for stable use with Net::LDAP for GSSAPI authentication, which the CPAN version is not. * Reorganize debian/rules, set CFLAGS correctly, add an explicit install target, and remove unnecessary debhelper invocations. * Improve the description and include a Homepage link. * Increase priority to optional. * Add build-depends on libauthen-sasl-perl and libsasl2-modules for running tests. * Update standards version to 3.6.1 (no changes required). * Update copyright to include the packaging history and the copyright and upstream details for the -server varient. * Add a watch file. -- Russ Allbery Sun, 12 Jun 2005 16:10:13 -0700 libauthen-sasl-cyrus-perl (0.12-1) unstable; urgency=low * QA Upload * Changed Maintainer to Debian QA Group * Changed Section from 'interpreters' to 'perl' to match override. * Added dependency on libauthen-sasl-perl, closes: #288569. * New upstream version - various bug fixes - closes: #250520. -- Stephen Quinney Wed, 2 Mar 2005 17:30:38 +0000 libauthen-sasl-cyrus-perl (0.07-1) unstable; urgency=low * New Maintainer -- Stephen Zander Mon, 26 May 2003 21:53:35 -0700 libauthen-sasl-cyrus-perl (0.05-2) unstable; urgency=low * Orphan this package. * Run dh_installdocs so that the copyright file gets installed. -- Mark Brown Thu, 15 May 2003 09:10:02 +0100 libauthen-sasl-cyrus-perl (0.05-1) unstable; urgency=low * New upstream release. * I think this version now does encryption with the SASL libraries -- if not, feel free to open the bug again. (Closes: #144130) * Update Standards-Version. -- Graeme Mathieson Sun, 29 Sep 2002 16:14:28 +0100 libauthen-sasl-cyrus-perl (0.02-1.1) unstable; urgency=low * NMU: Rebuilt against perl 5.8. -- Ben Burton Sun, 1 Sep 2002 15:48:33 +1000 libauthen-sasl-cyrus-perl (0.02-1) unstable; urgency=low * Initial Release. -- Graeme Mathieson Thu, 22 Nov 2001 15:50:41 +0000