diff options
Diffstat (limited to 'src/lib/kdb/err_handle.c')
-rw-r--r-- | src/lib/kdb/err_handle.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/kdb/err_handle.c b/src/lib/kdb/err_handle.c index 61f720eea..7d54441cb 100644 --- a/src/lib/kdb/err_handle.c +++ b/src/lib/kdb/err_handle.c @@ -11,8 +11,9 @@ static char *_csrc = "@(#) %filespec: err_handle.c~1 % (%full_filespec: err_handle.c~1:csrc:idc_sec#1 %)"; #endif -/* this file should be ideally be in util/et. But, for now thread safety requirement stops me from putting there. - if I do, then all the applications have to link to pthread */ +/* This file should be ideally be in util/et. But, for now thread + safety requirement stops me from putting there. if I do, then all + the applications have to link to pthread. */ #ifdef HAVE_PTHREAD_H #include <pthread.h> @@ -20,7 +21,9 @@ static char *_csrc = "@(#) %filespec: err_handle.c~1 % (%full_filespec: err_han #include "err_handle.h" #include <assert.h> +#ifdef NOVELL krb5_errcode_2_string_func old_error_2_string = NULL; +#endif typedef struct { char krb5_err_str[KRB5_MAX_ERR_STR + 1]; @@ -40,8 +43,10 @@ static pthread_key_t krb5_err_key; static void init_err_handling( void ) { assert(!pthread_key_create(&krb5_err_key, tsd_key_destructor)); +#ifdef NOVELL old_error_2_string = error_message; error_message = krb5_get_err_string; +#endif } static pthread_once_t krb5_key_create = PTHREAD_ONCE_INIT; @@ -100,8 +105,11 @@ const char * KRB5_CALLCONV krb5_get_err_string(long err_code) } /* Error strings are not generated here. the remaining two cases are handled by the default error string convertor */ +#ifdef NOVELL return old_error_2_string(err_code); - +#else + return error_message (err_code); +#endif } void krb5_clr_error() |