r70638 - in /trunk/libauthen-sasl-cyrus-perl: Cyrus.pm Cyrus.xs Makefile.PL debian/changelog debian/rules lib/Authen/SASL/Cyrus/Security.pm t/plain.t
rra at users.alioth.debian.org
rra at users.alioth.debian.org
Sun Mar 6 06:57:21 UTC 2011
Author: rra
Date: Sun Mar 6 06:57:09 2011
New Revision: 70638
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=70638
Log:
* 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.
Modified:
trunk/libauthen-sasl-cyrus-perl/Cyrus.pm
trunk/libauthen-sasl-cyrus-perl/Cyrus.xs
trunk/libauthen-sasl-cyrus-perl/Makefile.PL
trunk/libauthen-sasl-cyrus-perl/debian/changelog
trunk/libauthen-sasl-cyrus-perl/debian/rules
trunk/libauthen-sasl-cyrus-perl/lib/Authen/SASL/Cyrus/Security.pm
trunk/libauthen-sasl-cyrus-perl/t/plain.t
Modified: trunk/libauthen-sasl-cyrus-perl/Cyrus.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-sasl-cyrus-perl/Cyrus.pm?rev=70638&op=diff
==============================================================================
--- trunk/libauthen-sasl-cyrus-perl/Cyrus.pm (original)
+++ trunk/libauthen-sasl-cyrus-perl/Cyrus.pm Sun Mar 6 06:57:09 2011
@@ -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;
Modified: trunk/libauthen-sasl-cyrus-perl/Cyrus.xs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-sasl-cyrus-perl/Cyrus.xs?rev=70638&op=diff
==============================================================================
--- trunk/libauthen-sasl-cyrus-perl/Cyrus.xs (original)
+++ trunk/libauthen-sasl-cyrus-perl/Cyrus.xs Sun Mar 6 06:57:09 2011
@@ -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;
@@ -1234,6 +1241,8 @@
name of the server being contacted, which may also be used
by the underlying mechanism.
+See SYNOPSIS for an example.
+
=back
B<Remark>:
@@ -1246,10 +1255,6 @@
and CS 2.x on the server side. Don't know if it necessary for the client
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
@@ -1291,6 +1296,8 @@
=pod
+=over 4
+
=item server_start ( CHALLENGE )
C<server_start> begins the authentication using the chosen mechanism.
@@ -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;
@@ -1439,8 +1448,6 @@
See example below.
-=over 4
-
=cut
@@ -1456,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;
@@ -1477,6 +1485,8 @@
}
=pod
+
+=over 4
=item listmech( START , SEPARATOR , END )
@@ -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;
Modified: trunk/libauthen-sasl-cyrus-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-sasl-cyrus-perl/Makefile.PL?rev=70638&op=diff
==============================================================================
--- trunk/libauthen-sasl-cyrus-perl/Makefile.PL (original)
+++ trunk/libauthen-sasl-cyrus-perl/Makefile.PL Sun Mar 6 06:57:09 2011
@@ -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
}
Modified: trunk/libauthen-sasl-cyrus-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-sasl-cyrus-perl/debian/changelog?rev=70638&op=diff
==============================================================================
--- trunk/libauthen-sasl-cyrus-perl/debian/changelog (original)
+++ trunk/libauthen-sasl-cyrus-perl/debian/changelog Sun Mar 6 06:57:09 2011
@@ -1,3 +1,11 @@
+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 <rra at debian.org> 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
Modified: trunk/libauthen-sasl-cyrus-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-sasl-cyrus-perl/debian/rules?rev=70638&op=diff
==============================================================================
--- trunk/libauthen-sasl-cyrus-perl/debian/rules (original)
+++ trunk/libauthen-sasl-cyrus-perl/debian/rules Sun Mar 6 06:57:09 2011
@@ -5,6 +5,9 @@
override_dh_auto_configure:
dh_auto_configure -- LIBS="-lsasl2" DEFINE="-DSASL2"
+override_dh_auto_test:
+ USER=test dh_auto_test
+
override_dh_fixperms:
chmod 644 debian/$(PACKAGE)/usr/lib/perl5/Authen/SASL/Cyrus.pod
dh_fixperms
Modified: trunk/libauthen-sasl-cyrus-perl/lib/Authen/SASL/Cyrus/Security.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-sasl-cyrus-perl/lib/Authen/SASL/Cyrus/Security.pm?rev=70638&op=diff
==============================================================================
--- trunk/libauthen-sasl-cyrus-perl/lib/Authen/SASL/Cyrus/Security.pm (original)
+++ trunk/libauthen-sasl-cyrus-perl/lib/Authen/SASL/Cyrus/Security.pm Sun Mar 6 06:57:09 2011
@@ -73,12 +73,29 @@
# 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);
- print $fh $cryptbuf;
+ $len = length($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;
+ }
+ }
+ return (print $fh $cryptbuf) ? $len : -1;
}
# Given a GLOB ref, tie the filehandle of the GLOB to this class
Modified: trunk/libauthen-sasl-cyrus-perl/t/plain.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-sasl-cyrus-perl/t/plain.t?rev=70638&op=diff
==============================================================================
--- trunk/libauthen-sasl-cyrus-perl/t/plain.t (original)
+++ trunk/libauthen-sasl-cyrus-perl/t/plain.t Sun Mar 6 06:57:09 2011
@@ -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;
More information about the Pkg-perl-cvs-commits
mailing list