From b897862514b1a54ec72003df460761000a69e940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Fern=C3=A1ndez=20=C3=81lvarez?= Date: Wed, 25 Mar 2020 17:33:58 +0100 Subject: [PATCH] Include krb5_cc_copy_creds function --- lib/Authen/Krb5.pm | 5 +++++ lib/Authen/Krb5.xs | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/lib/Authen/Krb5.pm b/lib/Authen/Krb5.pm index e1255b0..8a0fc08 100644 --- a/lib/Authen/Krb5.pm +++ b/lib/Authen/Krb5.pm @@ -114,6 +114,11 @@ error. Initializes a context for the application. Returns a C object, or C if there was an error. +=func C + +Copies a credential cache to a different one. C, the credential cache +to be filled in, can be of different type. + =func C Initializes the Kerberos error tables. Should be called along with diff --git a/lib/Authen/Krb5.xs b/lib/Authen/Krb5.xs index 4b90de2..89ed6a3 100644 --- a/lib/Authen/Krb5.xs +++ b/lib/Authen/Krb5.xs @@ -617,6 +617,17 @@ krb5_recvauth(auth_context,fh,version,server,keytab) sv_setref_pv(ST(0),"Authen::Krb5::Ticket",(void*)ticket); XSRETURN(1); +void +cc_copy_creds(incc,outcc) + Authen::Krb5::Ccache incc + Authen::Krb5::Ccache outcc + + CODE: + err = krb5_cc_copy_creds(context, incc, outcc); + if (err) XSRETURN_UNDEF; + XSRETURN_YES; + + MODULE = Authen::Krb5 PACKAGE = Authen::Krb5::Principal