r58898 - in /branches/upstream/libgssapi-perl/current: Changes GSSAPI.pm GSSAPI.xs MANIFEST META.yml README t/inquire_cred.t t/test.t t/zbugfixes.t typemap xs/OID.xs

ansgar-guest at users.alioth.debian.org ansgar-guest at users.alioth.debian.org
Sat Jun 5 14:29:58 UTC 2010


Author: ansgar-guest
Date: Sat Jun  5 14:27:53 2010
New Revision: 58898

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=58898
Log:
[svn-upgrade] Integrating new upstream version, libgssapi-perl (0.28)

Added:
    branches/upstream/libgssapi-perl/current/t/inquire_cred.t
Modified:
    branches/upstream/libgssapi-perl/current/Changes
    branches/upstream/libgssapi-perl/current/GSSAPI.pm
    branches/upstream/libgssapi-perl/current/GSSAPI.xs
    branches/upstream/libgssapi-perl/current/MANIFEST
    branches/upstream/libgssapi-perl/current/META.yml
    branches/upstream/libgssapi-perl/current/README
    branches/upstream/libgssapi-perl/current/t/test.t
    branches/upstream/libgssapi-perl/current/t/zbugfixes.t
    branches/upstream/libgssapi-perl/current/typemap
    branches/upstream/libgssapi-perl/current/xs/OID.xs

Modified: branches/upstream/libgssapi-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgssapi-perl/current/Changes?rev=58898&op=diff
==============================================================================
--- branches/upstream/libgssapi-perl/current/Changes (original)
+++ branches/upstream/libgssapi-perl/current/Changes Sat Jun  5 14:27:53 2010
@@ -154,3 +154,8 @@
           Thanks to Andrew Savchenko bircoph at gmail.com
         - Changed sizeof(outputtype) to 0 to let Perl calculate the lengh
           in Name.xs. Thanks to Zoltan BANAI <Zoltan.Banai at morganstanley.com>
+
+0.28    Do 3. Jun 12:11:21 UTC 2010
+        - Fixed Lenght-problem in typemap, T_BUFFER_STR_OUT for Heimdal.
+          Thanks to Slaven Rezic <slaven at rezic.de> for report and patch.
+

Modified: branches/upstream/libgssapi-perl/current/GSSAPI.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgssapi-perl/current/GSSAPI.pm?rev=58898&op=diff
==============================================================================
--- branches/upstream/libgssapi-perl/current/GSSAPI.pm (original)
+++ branches/upstream/libgssapi-perl/current/GSSAPI.pm Sat Jun  5 14:27:53 2010
@@ -9,7 +9,7 @@
 use XSLoader;
 
 our @ISA = qw(Exporter);
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 
 # Items to export into callers namespace by default. Note: do not export
 # names by default without a very good reason. Use EXPORT_OK instead.
@@ -214,7 +214,7 @@
 
 This module wraps the GSSAPI C-Bindings. If you are
 new to GSSAPI it is a good idea to read RFC2743 and RFC2744,
-the documentation requires you to be familar with the concept
+the documentation requires you to be familiar with the concept
 and the wordings of GSSAPI programming.
 
 the examples directory holds some working examples of usage:

Modified: branches/upstream/libgssapi-perl/current/GSSAPI.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgssapi-perl/current/GSSAPI.xs?rev=58898&op=diff
==============================================================================
--- branches/upstream/libgssapi-perl/current/GSSAPI.xs (original)
+++ branches/upstream/libgssapi-perl/current/GSSAPI.xs Sat Jun  5 14:27:53 2010
@@ -155,6 +155,7 @@
 
 typedef void *				GSSAPI_obj;
 
+typedef gss_buffer_desc         gss_oidstr_out;
 
 int
 oid_set_is_dynamic(GSSAPI__OID__Set oidset)

Modified: branches/upstream/libgssapi-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgssapi-perl/current/MANIFEST?rev=58898&op=diff
==============================================================================
--- branches/upstream/libgssapi-perl/current/MANIFEST (original)
+++ branches/upstream/libgssapi-perl/current/MANIFEST Sat Jun  5 14:27:53 2010
@@ -28,3 +28,4 @@
 t/importnames.t
 t/indicatemechs.t
 ppport.h
+t/inquire_cred.t

Modified: branches/upstream/libgssapi-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgssapi-perl/current/META.yml?rev=58898&op=diff
==============================================================================
--- branches/upstream/libgssapi-perl/current/META.yml (original)
+++ branches/upstream/libgssapi-perl/current/META.yml Sat Jun  5 14:27:53 2010
@@ -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:         GSSAPI
-version:      0.27
+version:      0.28
 version_from: GSSAPI.pm
 installdirs:  site
 requires:

Modified: branches/upstream/libgssapi-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgssapi-perl/current/README?rev=58898&op=diff
==============================================================================
--- branches/upstream/libgssapi-perl/current/README (original)
+++ branches/upstream/libgssapi-perl/current/README Sat Jun  5 14:27:53 2010
@@ -1,4 +1,4 @@
-GSSAPI Perlbindings version 0.27
+GSSAPI Perlbindings version 0.28
 =================================
 GSSAPI - Perl extension for using
 GSSAPI C-Bindings as described in RFC 2744.
@@ -9,10 +9,13 @@
 
 - heimdal 0.6.2
 - heimdal 0.7.1
+- heimdal 1.0.1
+- heimdal 1.3.2
 - MIT Kerberos 5 release 1.5.2
 - MIT Kerberos 5 release 1.4.3
 - MIT Kerberos 5 release 1.3.1
 - MIT Kerberos 5 release 1.2.7
+- MIT Kerberos 5 release 1.6.3
 - VAS 3.0.1
 - Solaris 10 / Opensolaris native gss library
 

Added: branches/upstream/libgssapi-perl/current/t/inquire_cred.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgssapi-perl/current/t/inquire_cred.t?rev=58898&op=file
==============================================================================
--- branches/upstream/libgssapi-perl/current/t/inquire_cred.t (added)
+++ branches/upstream/libgssapi-perl/current/t/inquire_cred.t Sat Jun  5 14:27:53 2010
@@ -1,0 +1,77 @@
+#! /usr/bin/perl -w
+
+use strict;
+
+use ExtUtils::testlib;
+
+use GSSAPI qw(:all);
+use Test::More tests => 6;
+
+
+#
+#   GSSAPI::Cred
+#
+
+    my($cred1, $time, $name );
+    my $wanted_cred_usage = GSS_C_INITIATE;
+
+    my $oidset;
+
+    my $status = GSSAPI::Cred::acquire_cred(undef, 120, undef, $wanted_cred_usage,
+                $cred1, $oidset, $time);
+
+my $credusage_names = {
+
+    GSS_C_INITIATE + 0 => 'GSS_C_INITIATE',
+    GSS_C_ACCEPT   + 0 => 'GSS_C_ACCEPT',
+    GSS_C_BOTH     + 0 => 'GSS_C_BOTH',
+
+};
+
+SKIP: {
+    if ( $status->major != GSS_S_COMPLETE ) {
+        diag( "\n\nNo error: acquire_cred() failed, maybe because you have to run kinit first.\n",
+              "Errormessage from your GSSAPI-implementation is: \n\n" . qq{"$status"},
+              "\nrun kinit to get a TGT and retry this test (just skipping now).\n\n");
+        skip( 'This tests only work if user has run kinit succesfully' , 6 );
+    }
+    ok($status, "GSSAPI::Cred::acquire_cred, wanted_cred_usage $wanted_cred_usage");
+    ok(ref $cred1 eq "GSSAPI::Cred");
+    ok(ref $oidset eq "GSSAPI::OID::Set");
+
+    my($lifetime, $cred_usage);
+    $status = $cred1->inquire_cred($name, $lifetime, $cred_usage, $oidset);
+
+
+
+    ok( $status, '$cred1->inquire_cred($name, $lifetime, $cred_usage, $oidset' );
+    if ( $lifetime == -1 ) {
+       diag('The returned TGT lifetime is -1 (Heimdal 1.0.x returns -1 in case of ivalid TGT)');
+       diag('To get full test-coverage please run kinit to get a valid TGT and restart this test.');
+       skip( '$lifetime == -1' , 2 );
+    }
+    {
+        my $display;
+        my $status = $name->display($display);
+        if ( $status->major == GSS_S_COMPLETE ) {
+            diag("inquire_cred()    name:\t'$display'");
+        }
+    }
+    diag("inquire_cred()    lifetime:\t$lifetime seconds");
+    diag("inquire_cred()    credusage:\t $cred_usage (" . $credusage_names->{$cred_usage} . ')' );
+
+    ok(ref $oidset eq "GSSAPI::OID::Set");
+
+    #
+    # currently heimdal 1.3.2 fails the next test - please let me know
+    # if you have any ideas what is going wrong - as far as I can see
+    # this version of Heimal behaves strange and returns 'ACCEPT' if INITIATE
+    # is requested :-/
+    #
+    ok(
+          ( $cred_usage == $wanted_cred_usage or $cred_usage == GSS_C_BOTH ) ,
+          sprintf('expected cred usage (wanted %s, got %s)', map { $credusage_names->{$_} } ($wanted_cred_usage, $cred_usage))
+      );
+
+
+}

Modified: branches/upstream/libgssapi-perl/current/t/test.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgssapi-perl/current/t/test.t?rev=58898&op=diff
==============================================================================
--- branches/upstream/libgssapi-perl/current/t/test.t (original)
+++ branches/upstream/libgssapi-perl/current/t/test.t Sat Jun  5 14:27:53 2010
@@ -5,7 +5,7 @@
 use ExtUtils::testlib;
 
 use GSSAPI qw(:all);
-use Test::More tests => 19;
+use Test::More tests => 13;
 
 
 my $status;
@@ -26,7 +26,8 @@
 
    $status = $oid->to_str($str);
    ok($status, ' $oid->to_str($str) ');
-   ok($str eq '{ 1 2 840 113554 1 2 1 1 }', q{ $str eq '{ 1 2 840 113554 1 2 1 1 }' });
+   cmp_ok($str, 'eq', '{ 1 2 840 113554 1 2 1 1 }', q{ $str eq '{ 1 2 840 113554 1 2 1 1 }' });
+
 }
 
     { my(@oidss); foreach(1..1000) { push @oidss, GSSAPI::OID::Set->new() };
@@ -111,37 +112,6 @@
     }
     ok($okay, 'random types and values as input of GSSAPI::Binding');
 
-#
-#	GSSAPI::Cred
-#
-
-    my($cred1, $time, $name );
-
-    $status = GSSAPI::Cred::acquire_cred(undef, 120, undef, GSS_C_INITIATE,
-				$cred1, $oidset, $time);
-
-SKIP: {
-    if ( $status->major != GSS_S_COMPLETE ) {
-        diag( "\n\nNo error: acquire_cred() failed, maybe because you have to run kinit first.\n",
-              "Errormessage from your GSSAPI-implementation is: \n\n" . $status ,
-              "\nrun kinit to get a TGT and retry this test (just skipping now).\n\n");
-        skip( 'This tests only work if user has run kinit succesfully' , 6 );
-    }
-    ok($status, 'GSSAPI::Cred::acquire_cred');
-    ok(ref $cred1 eq "GSSAPI::Cred");
-    ok(ref $oidset eq "GSSAPI::OID::Set");
-
-    my($lifetime, $cred_usage);
-    $status = $cred1->inquire_cred($name, $lifetime, $cred_usage, $oidset);
-
-
-
-    ok( $status, '$cred1->inquire_cred($name, $lifetime, $cred_usage, $oidset' );
-
-    ok(ref $oidset eq "GSSAPI::OID::Set");
-    ok($cred_usage & GSS_C_INITIATE);
-
-}
 
 
 

Modified: branches/upstream/libgssapi-perl/current/t/zbugfixes.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgssapi-perl/current/t/zbugfixes.t?rev=58898&op=diff
==============================================================================
--- branches/upstream/libgssapi-perl/current/t/zbugfixes.t (original)
+++ branches/upstream/libgssapi-perl/current/t/zbugfixes.t Sat Jun  5 14:27:53 2010
@@ -30,9 +30,7 @@
            if ( $status->major != GSS_S_COMPLETE  ) {
              skip('$name->display() failed', 1 );
            }
-           ok ( $keystring eq lc $display,
-                'check bugfix of <http://rt.cpan.org/Public/Bug/Display.html?id=5681>');
-
+           cmp_ok ( lc $display, 'eq', $keystring, 'check bugfix of <http://rt.cpan.org/Public/Bug/Display.html?id=5681>');
        }
    }
 }

Modified: branches/upstream/libgssapi-perl/current/typemap
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgssapi-perl/current/typemap?rev=58898&op=diff
==============================================================================
--- branches/upstream/libgssapi-perl/current/typemap (original)
+++ branches/upstream/libgssapi-perl/current/typemap Sat Jun  5 14:27:53 2010
@@ -46,6 +46,7 @@
 gss_buffer_desc_copy				T_BUFFER_DESC_COPY
 gss_buffer_str					T_BUFFER_STR
 gss_buffer_str_out				T_BUFFER_STR_OUT
+gss_oidstr_out                  T_BUFFER_OIDSTR_OUT
 gss_cred_usage_t				T_IV
 gss_qop_t					T_UV
 OM_uint32					T_U_LONG
@@ -179,6 +180,11 @@
 	$var.length = 0;
 	$var.value = NULL;
 
+T_BUFFER_OIDSTR_OUT
+    $var.length = 0;
+    $var.value = NULL;
+
+
 
 OUTPUT
 
@@ -282,7 +288,7 @@
 
 T_BUFFER_STR_OUT
 	if ($var.value != NULL) {
-            sv_setpv($arg, $var.value);
+            sv_setpvn($arg, $var.value, $var.length);
 	    SvSETMAGIC($arg);
 	} else {
 	    sv_setsv_mg($arg, &PL_sv_undef);
@@ -292,7 +298,17 @@
 	    gss_release_buffer(&minor, &$var);
 	}
 
-
+T_BUFFER_OIDSTR_OUT
+    if ($var.value != NULL) {
+            sv_setpv($arg, $var.value );
+        SvSETMAGIC($arg);
+    } else {
+        sv_setsv_mg($arg, &PL_sv_undef);
+    }
+    {
+        OM_uint32 minor;
+        gss_release_buffer(&minor, &$var);
+    }
 
 #
 #	Okay, what do all these different typemaps do?  Anything that

Modified: branches/upstream/libgssapi-perl/current/xs/OID.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgssapi-perl/current/xs/OID.xs?rev=58898&op=diff
==============================================================================
--- branches/upstream/libgssapi-perl/current/xs/OID.xs (original)
+++ branches/upstream/libgssapi-perl/current/xs/OID.xs Sat Jun  5 14:27:53 2010
@@ -47,7 +47,7 @@
 GSSAPI::Status
 to_str(oid, str)
 	GSSAPI::OID		oid
-	gss_buffer_str_out	str
+	gss_oidstr_out	str
     CODE:
 	if (oid == NULL) {
 	    sv_setsv_mg(ST(1), &PL_sv_undef);




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