r2716 - in
/packages/libauthen-sasl-cyrus-perl/branches/upstream/current:
CHANGES Cyrus.pm Cyrus.pod Cyrus.xs META.yml Makefile.PL README
lib/Authen/SASL/Cyrus/Security.pm t/plain.t typemap
rra at users.alioth.debian.org
rra at users.alioth.debian.org
Sun May 7 22:33:51 UTC 2006
Author: rra
Date: Sun May 7 22:33:43 2006
New Revision: 2716
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=2716
Log:
Load /tmp/tmp.hIsS7l/libauthen-sasl-cyrus-perl-0.13-server into
packages/libauthen-sasl-cyrus-perl/branches/upstream/current.
Modified:
packages/libauthen-sasl-cyrus-perl/branches/upstream/current/CHANGES (contents, props changed)
packages/libauthen-sasl-cyrus-perl/branches/upstream/current/Cyrus.pm (contents, props changed)
packages/libauthen-sasl-cyrus-perl/branches/upstream/current/Cyrus.pod (contents, props changed)
packages/libauthen-sasl-cyrus-perl/branches/upstream/current/Cyrus.xs (contents, props changed)
packages/libauthen-sasl-cyrus-perl/branches/upstream/current/META.yml
packages/libauthen-sasl-cyrus-perl/branches/upstream/current/Makefile.PL (props changed)
packages/libauthen-sasl-cyrus-perl/branches/upstream/current/README (props changed)
packages/libauthen-sasl-cyrus-perl/branches/upstream/current/lib/Authen/SASL/Cyrus/Security.pm (props changed)
packages/libauthen-sasl-cyrus-perl/branches/upstream/current/t/plain.t (props changed)
packages/libauthen-sasl-cyrus-perl/branches/upstream/current/typemap
Modified: packages/libauthen-sasl-cyrus-perl/branches/upstream/current/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libauthen-sasl-cyrus-perl/branches/upstream/current/CHANGES?rev=2716&op=diff
==============================================================================
--- packages/libauthen-sasl-cyrus-perl/branches/upstream/current/CHANGES (original)
+++ packages/libauthen-sasl-cyrus-perl/branches/upstream/current/CHANGES Sun May 7 22:33:43 2006
@@ -1,4 +1,21 @@
History of updates to Authen::SASL::Cyrus
+
+0.13-server
+
+Russ Allbery: the 0.12-server distribution of this module has a typemap that
+ends up casting the pointer return from server_new and client_new through an
+int. This looks like it's causing pointer truncation and various problems on
+some 64-bit platforms (particularly Debian alpha and Debian ia64).
+
+There is a simpler fix than the patch below (just replacing int with long will
+work on most platforms, probably), but reading through the perlxs man page,
+there's apparently a specific way in which one is supposed to handle module
+data T_PTROBJ_SPECIAL. I went ahead and implemented that, which also improves
+error reporting a bit. After applying the following patch, the resulting C
+code no longer casts through an int (it casts through an IV instead, but that's
+sufficient on all Unix platforms at least).
+
+typedef for struct authensasl to Authen_SASL_Cyrus.
0.12-server
merged some of the changes from Authen::SASL::Cyrus 0.12
Propchange: packages/libauthen-sasl-cyrus-perl/branches/upstream/current/CHANGES
------------------------------------------------------------------------------
--- svn:executable (original)
+++ svn:executable Sun May 7 22:33:43 2006
@@ -1,0 +1,1 @@
+*
Modified: packages/libauthen-sasl-cyrus-perl/branches/upstream/current/Cyrus.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libauthen-sasl-cyrus-perl/branches/upstream/current/Cyrus.pm?rev=2716&op=diff
==============================================================================
--- packages/libauthen-sasl-cyrus-perl/branches/upstream/current/Cyrus.pm (original)
+++ packages/libauthen-sasl-cyrus-perl/branches/upstream/current/Cyrus.pm Sun May 7 22:33:43 2006
@@ -5,7 +5,7 @@
@ISA = qw(DynaLoader);# Exporter);
-$VERSION = "0.12-server";
+$VERSION = "0.13-server";
bootstrap Authen::SASL::Cyrus $VERSION;
Propchange: packages/libauthen-sasl-cyrus-perl/branches/upstream/current/Cyrus.pm
------------------------------------------------------------------------------
--- svn:executable (original)
+++ svn:executable Sun May 7 22:33:43 2006
@@ -1,0 +1,1 @@
+*
Modified: packages/libauthen-sasl-cyrus-perl/branches/upstream/current/Cyrus.pod
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libauthen-sasl-cyrus-perl/branches/upstream/current/Cyrus.pod?rev=2716&op=diff
==============================================================================
--- packages/libauthen-sasl-cyrus-perl/branches/upstream/current/Cyrus.pod (original)
+++ packages/libauthen-sasl-cyrus-perl/branches/upstream/current/Cyrus.pod Sun May 7 22:33:43 2006
@@ -473,9 +473,9 @@
Cyrus-SASL 2.x support by Leif Johansson
-Glue for server_* and some other structural improvements by Patrick Boettcher <patrick.boettcher at desy.de>
-
-Please report any bugs, or post any suggestions, to the author.
+Glue for server_* and many other structural improvements by Patrick Boettcher <patrick.boettcher at desy.de>
+
+Please report any bugs, or post any suggestions, to the authors.
=head1 THANKS
@@ -485,7 +485,7 @@
=head1 COPYRIGHT
-Copyright (c) 2003-4 Patrick Boettcher, DESY Zeuthen. All rights reserved.
+Copyright (c) 2003-5 Patrick Boettcher, DESY Zeuthen. All rights reserved.
Copyright (c) 2003 Carnegie Mellon University. All rights reserved.
This program is free software; you can redistribute it and/or modify it under
Propchange: packages/libauthen-sasl-cyrus-perl/branches/upstream/current/Cyrus.pod
------------------------------------------------------------------------------
--- svn:executable (original)
+++ svn:executable Sun May 7 22:33:43 2006
@@ -1,0 +1,1 @@
+*
Modified: packages/libauthen-sasl-cyrus-perl/branches/upstream/current/Cyrus.xs
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libauthen-sasl-cyrus-perl/branches/upstream/current/Cyrus.xs?rev=2716&op=diff
==============================================================================
--- packages/libauthen-sasl-cyrus-perl/branches/upstream/current/Cyrus.xs (original)
+++ packages/libauthen-sasl-cyrus-perl/branches/upstream/current/Cyrus.xs Sun May 7 22:33:43 2006
@@ -83,6 +83,8 @@
int is_client;
};
+
+typedef struct authensasl * Authen_SASL_Cyrus;
struct _perlcontext {
SV *func;
@@ -137,7 +139,7 @@
#endif
// internal method for handling errors and their messages
-int SetSaslError(struct authensasl *sasl,int code, const char* msg)
+int SetSaslError(Authen_SASL_Cyrus sasl,int code, const char* msg)
{
if (sasl == NULL)
#ifdef SASL2
@@ -931,7 +933,7 @@
*/
static
-void ExtractParentCallbacks(SV *parent, struct authensasl *sasl)
+void ExtractParentCallbacks(SV *parent, Authen_SASL_Cyrus sasl)
{
char *key;
int count=0,i;
@@ -1079,7 +1081,7 @@
}
-int init_sasl (SV* parent,char* service,char* host, struct authensasl **sasl,int client)
+int init_sasl (SV* parent,char* service,char* host, Authen_SASL_Cyrus *sasl,int client)
{
HV *hash;
SV **hashval;
@@ -1094,7 +1096,7 @@
if (*sasl == NULL)
{
// Initialize the given sasl
- *sasl = (struct authensasl *) malloc (sizeof(struct authensasl));
+ *sasl = (Authen_SASL_Cyrus) malloc (sizeof(struct authensasl));
if (*sasl == NULL)
croak("Out of memory\n");
memset(*sasl, 0, sizeof(struct authensasl));
@@ -1146,7 +1148,7 @@
}
#ifdef SASL2
-void set_secprop (struct authensasl *sasl)
+void set_secprop (Authen_SASL_Cyrus sasl)
{
sasl_security_properties_t ssp;
@@ -1181,7 +1183,7 @@
=cut
-struct authensasl *
+Authen_SASL_Cyrus
server_new(pkg, parent, service, host = NULL, iplocalport=NULL, ipremoteport=NULL ...)
char *pkg
SV *parent
@@ -1192,7 +1194,7 @@
CODE:
{
/* TODO realm parameter */
- struct authensasl *sasl = NULL;
+ Authen_SASL_Cyrus sasl = NULL;
int rc;
if ((rc = init_sasl(parent,service,host,&sasl,SASL_IS_SERVER)) != SASL_OK)
@@ -1251,7 +1253,7 @@
=cut
-struct authensasl *
+Authen_SASL_Cyrus
client_new(pkg, parent, service, host, iplocalport = NULL, ipremoteport = NULL...)
char *pkg
SV *parent
@@ -1261,7 +1263,7 @@
char *ipremoteport
CODE:
{
- struct authensasl *sasl = NULL;
+ Authen_SASL_Cyrus sasl = NULL;
int rc;
if ((rc = init_sasl(parent,service,host,&sasl,SASL_IS_CLIENT)) != SASL_OK)
@@ -1300,7 +1302,7 @@
char *
server_start(sasl,instring=NULL)
- struct authensasl *sasl;
+ Authen_SASL_Cyrus sasl;
const char *instring;
PREINIT:
int rc;
@@ -1350,7 +1352,7 @@
char *
client_start(sasl)
- struct authensasl *sasl
+ Authen_SASL_Cyrus sasl
PREINIT:
int rc;
unsigned outlen;
@@ -1390,7 +1392,7 @@
char *
server_step(sasl, instring)
- struct authensasl *sasl
+ Authen_SASL_Cyrus sasl
char *instring
PREINIT:
#ifdef SASL2
@@ -1444,7 +1446,7 @@
char *
client_step(sasl, instring)
- struct authensasl *sasl
+ Authen_SASL_Cyrus sasl
char *instring
PPCODE:
{
@@ -1487,7 +1489,7 @@
char *
listmech(sasl,start="",separator="|",end="")
- struct authensasl *sasl;
+ Authen_SASL_Cyrus sasl;
const char* start;
const char* separator;
const char* end;
@@ -1536,7 +1538,7 @@
int
setpass(sasl, user, pass, oldpass, flags=0)
- struct authensasl *sasl;
+ Authen_SASL_Cyrus sasl;
const char *user;
const char *pass;
const char *oldpass;
@@ -1553,7 +1555,7 @@
int checkpass(sasl,user,pass)
- struct authensasl *sasl;
+ Authen_SASL_Cyrus sasl;
const char *user;
const char *pass;
PREINIT:
@@ -1578,7 +1580,7 @@
void
global_listmech(sasl)
- struct authensasl *sasl
+ Authen_SASL_Cyrus sasl
PREINIT:
int i;
const char **mechs;
@@ -1612,7 +1614,7 @@
char *
encode(sasl, instring)
- struct authensasl *sasl
+ Authen_SASL_Cyrus sasl
char *instring
PPCODE:
{
@@ -1640,7 +1642,7 @@
char *
decode(sasl, instring)
- struct authensasl *sasl
+ Authen_SASL_Cyrus sasl
char *instring
PPCODE:
{
@@ -1669,7 +1671,7 @@
int
callback(sasl, ...)
- struct authensasl *sasl
+ Authen_SASL_Cyrus sasl
CODE:
/*
This function is unnecessary since there is no
@@ -1702,7 +1704,7 @@
char *
error(sasl)
- struct authensasl *sasl
+ Authen_SASL_Cyrus sasl
PPCODE:
{
_DEBUG("Current Error %x",sasl->error_code);
@@ -1736,7 +1738,7 @@
int
code(sasl)
- struct authensasl *sasl
+ Authen_SASL_Cyrus sasl
CODE:
RETVAL=sasl->error_code;
OUTPUT:
@@ -1753,7 +1755,7 @@
char *
mechanism(sasl)
- struct authensasl *sasl
+ Authen_SASL_Cyrus sasl
CODE:
RETVAL = sasl->mech;
OUTPUT:
@@ -1763,7 +1765,7 @@
char *
host(sasl, ...)
- struct authensasl *sasl
+ Authen_SASL_Cyrus sasl
CODE:
if (items > 1) {
if (sasl->server) free(sasl->server);
@@ -1777,7 +1779,7 @@
char *
user(sasl, ...)
- struct authensasl *sasl
+ Authen_SASL_Cyrus sasl
CODE:
if (items > 1) {
if (sasl->user) free(sasl->user);
@@ -1791,7 +1793,7 @@
char *
service(sasl, ...)
- struct authensasl *sasl
+ Authen_SASL_Cyrus sasl
CODE:
if (items > 1) {
if (sasl->service) free(sasl->service);
@@ -1814,7 +1816,7 @@
int
need_step(sasl)
- struct authensasl *sasl;
+ Authen_SASL_Cyrus sasl;
CODE:
RETVAL = sasl->error_code == SASL_CONTINUE;
OUTPUT:
@@ -1823,7 +1825,7 @@
int
property(sasl, ...)
-struct authensasl *sasl
+Authen_SASL_Cyrus sasl
PPCODE:
{
#ifdef SASL2
@@ -1924,7 +1926,7 @@
void
DESTROY(sasl)
- struct authensasl *sasl
+ Authen_SASL_Cyrus sasl
CODE:
{
__DEBUG("DESTROY");
Propchange: packages/libauthen-sasl-cyrus-perl/branches/upstream/current/Cyrus.xs
------------------------------------------------------------------------------
--- svn:executable (original)
+++ svn:executable Sun May 7 22:33:43 2006
@@ -1,0 +1,1 @@
+*
Modified: packages/libauthen-sasl-cyrus-perl/branches/upstream/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libauthen-sasl-cyrus-perl/branches/upstream/current/META.yml?rev=2716&op=diff
==============================================================================
--- packages/libauthen-sasl-cyrus-perl/branches/upstream/current/META.yml (original)
+++ packages/libauthen-sasl-cyrus-perl/branches/upstream/current/META.yml Sun May 7 22:33:43 2006
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Authen-SASL-Cyrus
-version: 0.12-server
+version: 0.13-server
version_from: Cyrus.pm
installdirs: site
requires:
Propchange: packages/libauthen-sasl-cyrus-perl/branches/upstream/current/Makefile.PL
------------------------------------------------------------------------------
--- svn:executable (original)
+++ svn:executable Sun May 7 22:33:43 2006
@@ -1,0 +1,1 @@
+*
Propchange: packages/libauthen-sasl-cyrus-perl/branches/upstream/current/README
------------------------------------------------------------------------------
--- svn:executable (original)
+++ svn:executable Sun May 7 22:33:43 2006
@@ -1,0 +1,1 @@
+*
Propchange: packages/libauthen-sasl-cyrus-perl/branches/upstream/current/lib/Authen/SASL/Cyrus/Security.pm
------------------------------------------------------------------------------
--- svn:executable (original)
+++ svn:executable Sun May 7 22:33:43 2006
@@ -1,0 +1,1 @@
+*
Propchange: packages/libauthen-sasl-cyrus-perl/branches/upstream/current/t/plain.t
------------------------------------------------------------------------------
--- svn:executable (original)
+++ svn:executable Sun May 7 22:33:43 2006
@@ -1,0 +1,1 @@
+*
Modified: packages/libauthen-sasl-cyrus-perl/branches/upstream/current/typemap
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libauthen-sasl-cyrus-perl/branches/upstream/current/typemap?rev=2716&op=diff
==============================================================================
--- packages/libauthen-sasl-cyrus-perl/branches/upstream/current/typemap (original)
+++ packages/libauthen-sasl-cyrus-perl/branches/upstream/current/typemap Sun May 7 22:33:43 2006
@@ -1,15 +1,17 @@
TYPEMAP
-struct authensasl * AuthenSASLtype
+Authen_SASL_Cyrus T_PTROBJ_SPECIAL
const char * T_PV
INPUT
-AuthenSASLtype
- if ((SvTYPE($arg) != SVt_RV) && (SvTYPE($arg) != SVt_PVMG)) {
- printf(\"First parameter was not a reference. It was type %d\\n\", SvTYPE($arg));
- XSRETURN(0);
- }
- $var = (struct authensasl *)SvIV(SvRV($arg));
+T_PTROBJ_SPECIAL
+ if (sv_derived_from($arg, \"${(my $ntt=$ntype)=~s/_/::/g; \$ntt}\")) {
+ IV tmp = SvIV((SV*)SvRV($arg));
+ $var = ($type) tmp;
+ }
+ else
+ croak(\"$var is not of type ${(my $ntt=$ntype)=~s /_/::/g;\$ntt}\")
OUTPUT
-AuthenSASLtype
- sv_setref_iv($arg, "Authen::SASL::Cyrus", (int)$var);
+T_PTROBJ_SPECIAL
+ sv_setref_pv($arg, \"${(my $ntt=$ntype)=~s/_/::/g;\$ntt}\",
+ (void*)$var);
More information about the Pkg-perl-cvs-commits
mailing list