r70639 - in /trunk/libauthen-sasl-cyrus-perl: Cyrus.pm Cyrus.xs Makefile.PL 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:57 UTC 2011


Author: rra
Date: Sun Mar  6 06:57:43 2011
New Revision: 70639

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=70639
Log:
Revert commit of upstream files with patches applied

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/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=70639&op=diff
==============================================================================
--- trunk/libauthen-sasl-cyrus-perl/Cyrus.pm (original)
+++ trunk/libauthen-sasl-cyrus-perl/Cyrus.pm Sun Mar  6 06:57:43 2011
@@ -5,9 +5,7 @@
 
 @ISA = qw(DynaLoader);# Exporter);
 
-# Modified for Debian from 0.13-server to avoid Perl 5.12 problems with
-# non-numeric versions.
-$VERSION = "0.13.1";
+$VERSION = "0.13-server";
 
 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=70639&op=diff
==============================================================================
--- trunk/libauthen-sasl-cyrus-perl/Cyrus.xs (original)
+++ trunk/libauthen-sasl-cyrus-perl/Cyrus.xs Sun Mar  6 06:57:43 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, Size_t *len, AV *args)
+int PerlCallbackSub (struct _perlcontext *cp, char **result, unsigned *len, AV *args)
 {
 	int rc = SASL_OK;
 
@@ -274,8 +274,7 @@
 int PerlCallback(void *context, int id, const char **result, unsigned *len)
 {
 	struct _perlcontext *cp = (struct _perlcontext *) context;
-	Size_t llen;
-        int rc=SASL_OK;
+	int llen, rc=SASL_OK;
 	char *c = NULL;
 
 	if (id != SASL_CB_USER &&
@@ -309,8 +308,7 @@
 int PerlCallbackRealm ( void *context, int id, const char **availrealms, const char **result)
 {
 	struct _perlcontext *cp = (struct _perlcontext *) context;
-	int rc = SASL_OK,i;
-	Size_t len;
+	int rc = SASL_OK,i,len;
 	char *c = NULL;
 
 	AV *args = newAV();
@@ -368,8 +366,7 @@
 int PerlCallbackSecret (sasl_conn_t *conn, void *context, int id, sasl_secret_t **psecret)
 {
 	struct _perlcontext *cp = (struct _perlcontext *) context;
-	int rc = SASL_OK;
-	Size_t len;
+	int len,rc = SASL_OK;
 	char *c = NULL;
 
 	/* HandlePerlStuff */
@@ -393,8 +390,7 @@
 					unsigned *out_ulen)
 {
 	struct _perlcontext *cp = (struct _perlcontext *) context;
-	int rc = SASL_OK;
-	Size_t len;
+	int rc = SASL_OK,len;
 	char *c = NULL;
 
 	AV *args;
@@ -437,8 +433,7 @@
 	const char *pass, unsigned passlen, struct propctx *propctx)
 {
 	struct _perlcontext *cp = (struct _perlcontext *) context;
-	int rc = SASL_OK;
-	Size_t len;
+	int rc = SASL_OK,len;
 	char *c = NULL;
 
 	AV *args = newAV();
@@ -472,8 +467,7 @@
 {
 	struct _perlcontext *cp = (struct _perlcontext *) context;
 	AV *args = newAV();
-	int rc = SASL_OK;
-	Size_t len;
+	int rc = SASL_OK, len;
 	char *c = NULL;
 
 	_DEBUG("ServerSetPass: %s, %s, %d",user,pass,passlen);
@@ -503,8 +497,7 @@
 {
 	struct _perlcontext *cp = (struct _perlcontext *) context;
 	AV *args = newAV();
-	int rc = SASL_OK;
-	Size_t len;
+	int rc = SASL_OK,len;
 	char *c = NULL;
 
 	_DEBUG("Authorize: %s, %s, %s",auth_identity,requested_user,def_realm);
@@ -944,7 +937,7 @@
 {
 	char *key;
 	int count=0,i;
-	I32 l;
+	long l;
 #ifndef SASL2
 	// Missing SASL1 canonuser workaround
 	int canon=-1,auth=-1;
@@ -1241,8 +1234,6 @@
 name of the server being contacted, which may also be used
 by the underlying mechanism.
 
-See SYNOPSIS for an example.
-
 =back
 
 B<Remark>:
@@ -1255,6 +1246,10 @@
 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
 
@@ -1296,8 +1291,6 @@
 
 =pod
 
-=over 4
-
 =item server_start ( CHALLENGE )
 
 C<server_start> begins the authentication using the chosen mechanism.
@@ -1313,8 +1306,7 @@
 	const char *instring;
 	PREINIT:
 		int rc;
-		Size_t inlen;
-		unsigned int outlen;
+		unsigned outlen,inlen;
 #ifdef SASL2
 		const char *outstring = NULL;
 #else
@@ -1410,8 +1402,7 @@
 		const char *error=NULL;
 #endif
 		int rc;
-		Size_t inlen;
-		unsigned int outlen=0;
+		unsigned int inlen, outlen=0;
 	PPCODE:
 		if (sasl->error_code != SASL_CONTINUE)
 			XSRETURN_UNDEF;
@@ -1448,6 +1439,8 @@
 
 See example below.
 
+=over 4
+
 =cut
 
 
@@ -1463,8 +1456,7 @@
     char *outstring=NULL;
 #endif
     int rc;
-    Size_t inlen;
-    unsigned int outlen=0;
+    unsigned int inlen, outlen=0;
 
     if (sasl->error_code != SASL_CONTINUE)
       XSRETURN_UNDEF;
@@ -1485,8 +1477,6 @@
   }
 
 =pod
-
-=over 4
 
 =item listmech( START , SEPARATOR , END )
 
@@ -1634,8 +1624,7 @@
     char *outstring=NULL;
 #endif
     int rc;
-	Size_t inlen;
-	unsigned int outlen=0;
+	unsigned int inlen, outlen=0;
 	if (sasl->error_code)
 		XSRETURN_UNDEF;
 
@@ -1663,8 +1652,7 @@
     char *outstring=NULL;
 #endif
     int rc;
-    Size_t inlen;
-    unsigned int outlen=0;
+    unsigned int inlen, 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=70639&op=diff
==============================================================================
--- trunk/libauthen-sasl-cyrus-perl/Makefile.PL (original)
+++ trunk/libauthen-sasl-cyrus-perl/Makefile.PL Sun Mar  6 06:57:43 2011
@@ -16,12 +16,12 @@
 package MY;
 sub manifypods
 {
-	my $inherited = shift->SUPER::manifypods(@_);
-	return <<"POD";
-$inherited
+	return <<'POD';
+manifypods: Cyrus.pod
+
 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/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=70639&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:43 2011
@@ -73,29 +73,12 @@
 # all the data to be encrypted is immediately available
 sub WRITE {
   my($ref,$string,$len) = @_;
-  my($fh, $clearbuf, $cryptbuf, $maxbuf);
+  my($fh, $clearbuf, $cryptbuf);
 
   $fh = $ref->{fh};
   $clearbuf = substr($string, 0, $len);
-  $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;
+  $cryptbuf = $ref->{conn}->encode($clearbuf);
+  print $fh $cryptbuf;
 }
 
 # 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=70639&op=diff
==============================================================================
--- trunk/libauthen-sasl-cyrus-perl/t/plain.t (original)
+++ trunk/libauthen-sasl-cyrus-perl/t/plain.t Sun Mar  6 06:57:43 2011
@@ -50,7 +50,7 @@
 		print "Server: Test successful Negotiation succeeded.\n";
 	} else {
 		ok(0);
-		warn "Server: Negotiation failed.\n",$conn->error(),"\n";
+		print "Server: Negotiation failed.\n",$conn->error(),"\n";
 	}
 
 	close FROM_CLIENT;
@@ -82,7 +82,7 @@
 	if ($conn->code == 0) {
 		print "Client: Negotiation succeeded.\n";
 	} else { 
-		warn "Client: Negotiation failed.\n",$conn->error,"\n";
+		print "Client: Negotiation failed.\n",$conn->error,"\n";
 	}
 	
 	close FROM_PARENT;




More information about the Pkg-perl-cvs-commits mailing list