42 lines
901 B
Plaintext
42 lines
901 B
Plaintext
$OpenBSD: patch-Simple_xs,v 1.1 2005/02/09 05:36:24 pvalchev Exp $
|
|
--- Simple.xs.orig Sun Jan 19 13:33:34 2003
|
|
+++ Simple.xs Tue Feb 8 22:32:42 2005
|
|
@@ -61,6 +61,20 @@ cleanup2:
|
|
return(ret);
|
|
}
|
|
|
|
+const char * _krb5_error_msg(int errcode) {
|
|
+
|
|
+ krb5_context ctx;
|
|
+ const char *ret = NULL;
|
|
+
|
|
+ if (!krb5_init_context(&ctx)) {
|
|
+ ret=krb5_get_err_text(ctx, errcode);
|
|
+ krb5_free_context(ctx);
|
|
+ } else {
|
|
+ ret="Error getting error message";
|
|
+ }
|
|
+ return ret;
|
|
+}
|
|
+
|
|
MODULE = Authen::Krb5::Simple PACKAGE = Authen::Krb5::Simple
|
|
|
|
PROTOTYPES: DISABLE
|
|
@@ -75,14 +89,12 @@ krb5_auth(user, password)
|
|
OUTPUT:
|
|
RETVAL
|
|
|
|
-char*
|
|
+const char*
|
|
krb5_errstr(errcode)
|
|
INPUT:
|
|
int errcode;
|
|
- INIT:
|
|
- char* result = (char*)error_message(errcode);
|
|
CODE:
|
|
- RETVAL = result;
|
|
+ RETVAL = _krb5_error_msg(errcode);
|
|
OUTPUT:
|
|
RETVAL
|
|
|