r50227 - in /branches/upstream/libauthen-krb5-perl/current: COPYRIGHT Changes Krb5.pm Krb5.xs README

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Tue Jan 5 04:01:21 UTC 2010


Author: jawnsy-guest
Date: Tue Jan  5 04:01:09 2010
New Revision: 50227

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

Modified:
    branches/upstream/libauthen-krb5-perl/current/COPYRIGHT
    branches/upstream/libauthen-krb5-perl/current/Changes
    branches/upstream/libauthen-krb5-perl/current/Krb5.pm
    branches/upstream/libauthen-krb5-perl/current/Krb5.xs
    branches/upstream/libauthen-krb5-perl/current/README

Modified: branches/upstream/libauthen-krb5-perl/current/COPYRIGHT
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libauthen-krb5-perl/current/COPYRIGHT?rev=50227&op=diff
==============================================================================
--- branches/upstream/libauthen-krb5-perl/current/COPYRIGHT (original)
+++ branches/upstream/libauthen-krb5-perl/current/COPYRIGHT Tue Jan  5 04:01:09 2010
@@ -1,3 +1,3 @@
-Copyright (c) 2000-2008 Jeff Horwitz (jeff at smashing.org).  All rights reserved.
+Copyright (c) 2000-2010 Jeff Horwitz (jeff at smashing.org).  All rights reserved.
 This module is free software; you can redistribute it and/or modify it under
 the same terms as Perl itself.

Modified: branches/upstream/libauthen-krb5-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libauthen-krb5-perl/current/Changes?rev=50227&op=diff
==============================================================================
--- branches/upstream/libauthen-krb5-perl/current/Changes (original)
+++ branches/upstream/libauthen-krb5-perl/current/Changes Tue Jan  5 04:01:09 2010
@@ -1,4 +1,6 @@
 Revision history for Perl extension Krb5.
+
+1.9	Add Authen::Krb5::Creds object (tom.jones at oucs.ox.ac.uk)
 
 1.8     Fix broken get_in_tkt_with_password implementation (rra at debian.org)
         Add some missing prototypes (rra at debian.org)

Modified: branches/upstream/libauthen-krb5-perl/current/Krb5.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libauthen-krb5-perl/current/Krb5.pm?rev=50227&op=diff
==============================================================================
--- branches/upstream/libauthen-krb5-perl/current/Krb5.pm (original)
+++ branches/upstream/libauthen-krb5-perl/current/Krb5.pm Tue Jan  5 04:01:09 2010
@@ -52,7 +52,7 @@
 	KRB5_NT_UNKNOWN
 	KRB5_TGS_NAME
 );
-$VERSION = '1.8';
+$VERSION = '1.9';
 
 sub KRB5_TGS_NAME() { return "krbtgt"; }
 
@@ -558,6 +558,47 @@
 
 =back
 
+=item Authen::Krb5::Creds
+
+Object representing a credential.
+
+=over 4
+
+=item o starttime()
+
+Returns the starttime time property of the credential.
+
+=item o authtime()
+
+Returns the authtime time property of the credential.
+
+=item o endtime()
+
+Returns the endtime time property of the credential.
+
+=item o renew_till()
+
+Returns the renew_till time property of the credential.
+
+=item o server()
+
+Returns the name of the service principal the credential is for.
+
+=item o client()
+
+Returns the client principal name (will usually be identical for all
+credentials in a credential cache).
+
+=item o ticket()
+
+Returns the Authen::Krb5::Ticket for this credential.
+
+=item o keyblock()
+
+Returns the keyblock of the credential.
+
+=back
+
 =head1 AUTHOR
 
 Jeff Horwitz (jeff at smashing.org)

Modified: branches/upstream/libauthen-krb5-perl/current/Krb5.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libauthen-krb5-perl/current/Krb5.xs?rev=50227&op=diff
==============================================================================
--- branches/upstream/libauthen-krb5-perl/current/Krb5.xs (original)
+++ branches/upstream/libauthen-krb5-perl/current/Krb5.xs Tue Jan  5 04:01:09 2010
@@ -8,7 +8,12 @@
 /* We currently provide some private functions and probably shouldn't. */
 #define KRB5_PRIVATE 1
 #include <krb5.h>
-#include <com_err.h>
+
+/* Recent versions of Kerberos include com_err on their own.  Uncomment if you
+ * have an older version and the complier complains about missing headers.
+ */
+/* #include <com_err.h> */
+
 #include <errno.h>
 #include "krb5_constants.c"
 
@@ -1286,6 +1291,123 @@
 
 MODULE = Authen::Krb5   PACKAGE = Authen::Krb5::Creds
 
+krb5_timestamp
+starttime(cred)
+	Authen::Krb5::Creds cred
+
+	CODE:
+	if (!cred->times.starttime)
+            cred->times.starttime = cred->times.authtime;
+        RETVAL = cred->times.starttime;
+
+	OUTPUT:
+	RETVAL
+
+krb5_timestamp
+authtime(cred)
+	Authen::Krb5::Creds cred
+
+	CODE:
+	RETVAL = cred->times.authtime;
+
+        OUTPUT:
+        RETVAL
+
+krb5_timestamp
+endtime(cred)
+	Authen::Krb5::Creds cred
+
+	CODE:
+	RETVAL = cred->times.endtime;
+
+	OUTPUT:
+	RETVAL
+
+krb5_timestamp
+renew_till(cred)
+	Authen::Krb5::Creds cred
+
+	CODE:
+	RETVAL = cred->times.renew_till;
+
+	OUTPUT:
+	RETVAL
+
+char *
+server(cred)
+	Authen::Krb5::Creds cred
+
+	PREINIT:
+	krb5_error_code retval;
+	char *sname;
+
+	CODE:
+	retval = krb5_unparse_name(context, cred->server, &sname);
+	if (retval) {
+	    com_err("Authen::Krb5::Creds", retval, "while unparsing server name");
+            return;
+	}
+
+	RETVAL = sname;
+
+	OUTPUT:
+	RETVAL
+
+char *
+client(cred)
+	Authen::Krb5::Creds cred
+
+	PREINIT:
+	krb5_error_code retval;
+	char *name;
+
+	CODE:
+	retval = krb5_unparse_name(context, cred->client, &name);
+	if (retval) {
+	    com_err("Authen::Krb5::Creds", retval, "while unparsing client name");
+            return;
+	}
+
+	RETVAL = name;
+
+	OUTPUT:
+	RETVAL
+
+Authen::Krb5::Ticket
+ticket(cred)
+	Authen::Krb5::Creds cred
+
+	PREINIT:
+	krb5_error_code retval;
+	krb5_ticket *t;
+
+	CODE:	
+	if (!New(0,t,1,krb5_ticket)) XSRETURN_UNDEF;
+
+	retval = krb5_decode_ticket(&cred->ticket, &t);
+
+	RETVAL = t;
+
+	can_free((SV *)RETVAL);
+
+	OUTPUT:
+	RETVAL
+
+Authen::Krb5::Keyblock
+keyblock(cred)
+	Authen::Krb5::Creds cred
+
+	CODE:
+	RETVAL = &cred->keyblock;
+
+        can_free((SV *)RETVAL);
+
+	OUTPUT:
+	RETVAL
+
+# TODO: Authen::Krb5::Address
+# addresses(cred)
+
 void
 DESTROY(creds)
         Authen::Krb5::Creds creds

Modified: branches/upstream/libauthen-krb5-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libauthen-krb5-perl/current/README?rev=50227&op=diff
==============================================================================
--- branches/upstream/libauthen-krb5-perl/current/README (original)
+++ branches/upstream/libauthen-krb5-perl/current/README Tue Jan  5 04:01:09 2010
@@ -1,6 +1,10 @@
 Krb5 provides an object oriented interface to the most commonly used
 functions included in the Kerberos 5 API.  It was developed and tested
 using Perl 5.005_03 and MIT Kerberos 5 version 1.0.5 and 1.1.1.
+
+NOTE: This module is very out of date, though it should still work with recent
+Kerberos 5 libraries.  Version 2.0 will be a well deserved, complete rewrite.
+Following version 1.9, only bug fixes will be released for the 1.x series.
 
 Your comments and bug reports are welcome.  Please send them to me at
 jeff at smashing.org.




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