Subject: | patch to return kerberos error code |
As far as I can see both Authen::Krb5 and Authen::Krb5::Admin have an error()
method which translates the kerberos error code into the corresponding error
message.
I've heard such messages have changed between some kerberos versions.
Anyway this patch adds an error_code() method
It seems to work for me but I've never done XS before.
diff -u Authen-Krb5-Admin-0.15.orig/Admin.xs Authen-Krb5-Admin-0.15/Admin.xs
--- Authen-Krb5-Admin-0.15.orig/Admin.xs 2012-11-01 19:55:24.000000000 +1000
+++ Authen-Krb5-Admin-0.15/Admin.xs 2012-11-10 16:15:26.000000000 +1000
@@ -1106,6 +1106,13 @@
SvIOK_on(ST(0));
}
+int
+kadm5_error_code ()
+ CODE:
+ RETVAL = err;
+ OUTPUT:
+ RETVAL
+
Authen::Krb5::Admin::Policy
kadm5_get_policy(handle, name = "default")
Authen::Krb5::Admin handle