r17512 - in /branches/upstream/libauthen-tacacsplus-perl/current: Changes META.yml Makefile.PL TacacsPlus.pm TacacsPlus.xs test.pl

roberto at users.alioth.debian.org roberto at users.alioth.debian.org
Sun Mar 16 01:03:17 UTC 2008


Author: roberto
Date: Sun Mar 16 01:03:16 2008
New Revision: 17512

URL: http://svn.debian.org/wsvn/?sc=1&rev=17512
Log:
[svn-upgrade] Integrating new upstream version, libauthen-tacacsplus-perl (0.18)

Modified:
    branches/upstream/libauthen-tacacsplus-perl/current/Changes
    branches/upstream/libauthen-tacacsplus-perl/current/META.yml
    branches/upstream/libauthen-tacacsplus-perl/current/Makefile.PL
    branches/upstream/libauthen-tacacsplus-perl/current/TacacsPlus.pm
    branches/upstream/libauthen-tacacsplus-perl/current/TacacsPlus.xs
    branches/upstream/libauthen-tacacsplus-perl/current/test.pl

Modified: branches/upstream/libauthen-tacacsplus-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libauthen-tacacsplus-perl/current/Changes?rev=17512&op=diff
==============================================================================
--- branches/upstream/libauthen-tacacsplus-perl/current/Changes (original)
+++ branches/upstream/libauthen-tacacsplus-perl/current/Changes Sun Mar 16 01:03:16 2008
@@ -25,4 +25,13 @@
      - Fixed a typedef in md5.h that breaks md5 on 64 bit machines. Patch
      provided by Ernst Oudhof.
      - Removed bogus broken constant TACACS_CLIENT.
-     - Fixed a number of compiler warnings, but still does not compile on Windows.
+     - Fixed a number of compiler warnings, but still does not compile on
+     Windows.
+
+0.18 Sat Mar 15 2008, Mike McCauley
+     - Disabled default setting of -symbolic in Makefile.PL
+     on Solaris since it seems to be
+     no longer required on most platforms.
+     - Improved errmsg() so it works as advertised
+     - test suite now uses Test.
+     - test suite now skips if there is no Tacacs server to test against

Modified: branches/upstream/libauthen-tacacsplus-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libauthen-tacacsplus-perl/current/META.yml?rev=17512&op=diff
==============================================================================
--- branches/upstream/libauthen-tacacsplus-perl/current/META.yml (original)
+++ branches/upstream/libauthen-tacacsplus-perl/current/META.yml Sun Mar 16 01:03:16 2008
@@ -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-TacacsPlus
-version:      0.17
+version:      0.18
 version_from: TacacsPlus.pm
 installdirs:  site
 requires:

Modified: branches/upstream/libauthen-tacacsplus-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/branches/upstream/libauthen-tacacsplus-perl/current/Makefile.PL?rev=17512&op=diff
==============================================================================
--- branches/upstream/libauthen-tacacsplus-perl/current/Makefile.PL (original)
+++ branches/upstream/libauthen-tacacsplus-perl/current/Makefile.PL Sun Mar 16 01:03:16 2008
@@ -4,12 +4,11 @@
 
 use Config;
 
-$osname=$Config{osname};
-
-# On Solaris, can get the wrong version of md5 unless we do this:
+# On some versions of Solaris, under some circumstances, 
+# can get the wrong version of md5 unless we do this:
 # Will also get lots of complaints about undefined symbols
-if ($osname eq 'solaris') {
-        $ex_cc_flags='-symbolic';
+if ($Config{osname} eq 'solaris') {
+#        $ex_cc_flags='-symbolic';
 }
 
 WriteMakefile(

Modified: branches/upstream/libauthen-tacacsplus-perl/current/TacacsPlus.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libauthen-tacacsplus-perl/current/TacacsPlus.pm?rev=17512&op=diff
==============================================================================
--- branches/upstream/libauthen-tacacsplus-perl/current/TacacsPlus.pm (original)
+++ branches/upstream/libauthen-tacacsplus-perl/current/TacacsPlus.pm Sun Mar 16 01:03:16 2008
@@ -17,7 +17,7 @@
 @EXPORT_OK = qw(
 	TACPLUS_CLIENT
 );
-$VERSION = '0.17';
+$VERSION = '0.18';
 
 sub new
 {

Modified: branches/upstream/libauthen-tacacsplus-perl/current/TacacsPlus.xs
URL: http://svn.debian.org/wsvn/branches/upstream/libauthen-tacacsplus-perl/current/TacacsPlus.xs?rev=17512&op=diff
==============================================================================
--- branches/upstream/libauthen-tacacsplus-perl/current/TacacsPlus.xs (original)
+++ branches/upstream/libauthen-tacacsplus-perl/current/TacacsPlus.xs Sun Mar 16 01:03:16 2008
@@ -135,10 +135,10 @@
 deinit_tac_session()
 
 
-SV *                                                                
+char *                                                               
 errmsg()                                                     
-    CODE:                                                           
-        {                                                           
-                                                                    
-            RETVAL = sv_2mortal(newSVpv(tac_err,strlen(tac_err)));     
-        }                                                           
+    CODE:  
+     RETVAL = tac_err;     
+    OUTPUT:
+     RETVAL
+

Modified: branches/upstream/libauthen-tacacsplus-perl/current/test.pl
URL: http://svn.debian.org/wsvn/branches/upstream/libauthen-tacacsplus-perl/current/test.pl?rev=17512&op=diff
==============================================================================
--- branches/upstream/libauthen-tacacsplus-perl/current/test.pl (original)
+++ branches/upstream/libauthen-tacacsplus-perl/current/test.pl Sun Mar 16 01:03:16 2008
@@ -6,11 +6,10 @@
 # Change 1..1 below to 1..last_test_to_print .
 # (It may become useful if the test is moved to ./t subdirectory.)
 
-BEGIN { $| = 1; print "1..7\n"; }
-END {print "not ok 1\n" unless $loaded;}
+use Test;
+BEGIN { plan tests => 10 };
 use Authen::TacacsPlus;
-$loaded = 1;
-print "ok 1\n";
+ok(1);
 
 ######################### End of black magic.
 
@@ -19,15 +18,16 @@
 # of the test code):
 
 # You will have to change these to suit yourself:
-my $host = 'zulu.open.com.au';
-my $key = 'mysecret';
+my $host = $ENV{AUTHEN_TACACSPLUS_TEST_HOST} || 'zulu.open.com.au';
+my $key = $ENV{AUTHEN_TACACSPLUS_TEST_KEY} || 'mysecret';
 my $timeout = 15;
 my $port = 49;
-my $username = 'mikem';
-my $password = 'fred';
+my $username = $ENV{AUTHEN_TACACSPLUS_TEST_USERNAME} || 'mikem';
+my $password = $ENV{AUTHEN_TACACSPLUS_TEST_PASSWORD} || 'fred';
 # This is the CHAP encrypted password, including the challenge
 # and identifier
-my $chap_password = 'djfhafghlkdlkfjasgljksgljkdsjsdfshdfgsdfkjglgh';
+my $chap_password = $ENV{AUTHEN_TACACSPLUS_TEST_CHAP_PASSWORD} 
+    || 'djfhafghlkdlkfjasgljksgljkdsjsdfshdfgsdfkjglgh';
 
 my $tac = new Authen::TacacsPlus(Host=>$host,
 				 Key=>$key,
@@ -35,69 +35,37 @@
 				 Port=>$port);
 if ($tac)
 {
-    print "ok 2\n";
+    ok(1);
 }
 else
 {
-    print "Could not connect to TACACSPLUS Host $self->{Host}: " . Authen::TacacsPlus::errmsg() . "\n";
-    print "not ok 2\n" ;
+    foreach (2..10)
+    {
+	skip('Unable to complete tests because the test Tacacs server could not be contacted');
+    }
+    exit;
 }
 
 
 # test default type (ASCII), backwards compatible
-if ($tac->authen($username, $password))
-{
-    print "ok 3\n";
-}
-else
-{
-    my $reason = Authen::TacacsPlus::errmsg();
-    print "authen failed: $reason\n";
-    print "not ok 3\n" 
-}
-$tac->close();
+ok($tac->authen($username, $password));
+ok($tac->close() == 0);
 
 my $tac = new Authen::TacacsPlus(Host=>$host,
 				 Key=>$key,
 				 Timeout=>$timeout,
 				 Port=>$port);
-if ($tac)
-{
-    print "ok 4\n";
-}
-else
-{
-    print "Could not connect to TACACSPLUS Host $self->{Host}: " . Authen::TacacsPlus::errmsg() . "\n";
-    print "not ok 4\n" ;
-}
-
+ok($tac);
 
 # test default PAP type
-if ($tac->authen($username, $password, &Authen::TacacsPlus::TAC_PLUS_AUTHEN_TYPE_PAP))
-{
-    print "ok 5\n";
-}
-else
-{
-    my $reason = Authen::TacacsPlus::errmsg();
-    print "authen failed: $reason\n";
-    print "not ok 5\n" 
-}
-$tac->close();
+ok($tac->authen($username, $password, &Authen::TacacsPlus::TAC_PLUS_AUTHEN_TYPE_PAP));
+ok($tac->close() == 0);
 
 $tac = new Authen::TacacsPlus(Host=>$host,
 				 Key=>$key,
 				 Timeout=>$timeout,
 				 Port=>$port);
-if ($tac)
-{
-    print "ok 6\n";
-}
-else
-{
-    print "Could not connect to TACACSPLUS Host $self->{Host}: " . Authen::TacacsPlus::errmsg() . "\n";
-    print "not ok 6\n" ;
-}
+ok($tac);
 
 # test CHAP auth type
 require Digest::MD5;
@@ -108,15 +76,6 @@
 $chap_response = Digest::MD5::md5($chap_id . $password . $chap_challenge);
 $chap_string = $chap_id . $chap_challenge . $chap_response;
 
-if ($tac->authen($username, $chap_string, &Authen::TacacsPlus::TAC_PLUS_AUTHEN_TYPE_CHAP))
-{
-    print "ok 7\n";
-}
-else
-{
-    my $reason = Authen::TacacsPlus::errmsg();
-    print "authen failed: $reason\n";
-    print "not ok 7\n" 
-}
-$tac->close();
+ok($tac->authen($username, $chap_string, &Authen::TacacsPlus::TAC_PLUS_AUTHEN_TYPE_CHAP));
+ok($tac->close() == 0);
 




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