Subject: | patch for Krb5.xs to add forwardable option |
Date: | Mon, 20 May 2013 10:40:06 -0700 |
To: | bug-Authen-Krb5 [...] rt.cpan.org |
From: | Duke Nguyen <nguyen.duke [...] gmail.com> |
Hello,
I've edited Krb5.xs slightly to add an optional parameter to the
krb5_get_init_creds_password function. This is an optional paramater and
as such is backwards compatible. It will allow users to request
forwardable tickets that can be used downstream for credential delegation.
If this is ok w/ you, it would be nice if you could add it to the next
version of Authen::Krb5.
Thanks,
Duke Nguyen
nguyen.duke@gmail.com
-----------
Authen::Krb5::Creds
krb5_get_init_creds_password(client, password, service = NULL, *forwardable
= 0*)
Authen::Krb5::Principal client
char *password
char *service
* int forwardable*
PREINIT:
krb5_get_init_creds_opt opt;
CODE:
if (service != NULL && service[0] == '\0') service = NULL;
RETVAL = calloc(1, sizeof(krb5_creds));
if (RETVAL == NULL) {
err = errno;
XSRETURN_UNDEF;
}
krb5_get_init_creds_opt_init(&opt);
*if (forwardable) {*
* krb5_get_init_creds_opt_set_forwardable(&opt, 1);*
* }*
err = krb5_get_init_creds_password(context, RETVAL, client,
password,
NULL, NULL, 0, service, &opt);