From: Ken Raeburn Date: Fri, 6 Nov 2009 20:16:53 +0000 (+0000) Subject: Use krb5_get_error_message for reporting if krb5_get_server_rcache fails X-Git-Tag: krb5-1.8-alpha1~204 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=965c41375099ee25440ee09e9b4a2db56ca7d7e0;p=krb5.git Use krb5_get_error_message for reporting if krb5_get_server_rcache fails git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23137 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/tests/threads/t_rcache.c b/src/tests/threads/t_rcache.c index eb94b2eaf..e3416f23c 100644 --- a/src/tests/threads/t_rcache.c +++ b/src/tests/threads/t_rcache.c @@ -78,7 +78,9 @@ static void try_one (struct tinfo *t) #ifndef INIT_ONCE err = krb5_get_server_rcache(ctx, &piece, &my_rcache); if (err) { - com_err(prog, err, "getting replay cache"); + const char *msg = krb5_get_error_message(ctx, err); + fprintf(stderr, "%s while initializing replay cache\n", msg); + krb5_free_error_message(ctx, msg); exit(1); } #else @@ -134,7 +136,9 @@ int main (int argc, char *argv[]) #ifdef INIT_ONCE err = krb5_get_server_rcache(ctx, &piece, &rcache); if (err) { - com_err(prog, err, "getting replay cache"); + const char *msg = krb5_get_error_message(ctx, err); + fprintf(stderr, "%s: %s while initializing replay cache\n", prog, msg); + krb5_free_error_message(ctx, msg); return 1; } #endif