From e8a6cc02fe34051eff0d96b0c6c13e802af0014b Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Thu, 7 Nov 1996 17:05:50 +0000 Subject: [PATCH] Check the error return from krb5_init_context(), and print an error message if necessary. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9316 dc483132-0cff-0310-8789-dd5450dbe970 --- src/clients/kdestroy/ChangeLog | 6 ++++++ src/clients/kdestroy/kdestroy.c | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/clients/kdestroy/ChangeLog b/src/clients/kdestroy/ChangeLog index 35675e0f8..19ad80e81 100644 --- a/src/clients/kdestroy/ChangeLog +++ b/src/clients/kdestroy/ChangeLog @@ -1,3 +1,9 @@ +Wed Nov 6 12:02:20 1996 Theodore Ts'o + + * kdestroy.c (main): Check the error return from + krb5_init_context(), and print an error message if + necessary. + Tue Sep 10 14:13:33 1996 Tom Yu * kdestroy.M: remove ".so man1/header.doc" diff --git a/src/clients/kdestroy/kdestroy.c b/src/clients/kdestroy/kdestroy.c index 5ead48f91..5cd8d89f7 100644 --- a/src/clients/kdestroy/kdestroy.c +++ b/src/clients/kdestroy/kdestroy.c @@ -38,6 +38,7 @@ main(argc, argv) char **argv; { krb5_context kcontext; + krb5_error_code retval; int c; krb5_ccache cache = NULL; char *cache_name = NULL; @@ -45,8 +46,11 @@ main(argc, argv) int errflg=0; int quiet = 0; - krb5_init_context(&kcontext); - krb5_init_ets(kcontext); + retval = krb5_init_context(&kcontext); + if (retval) { + com_err(argv[0], status, "while initializing krb5"); + exit(1); + } if (strrchr(argv[0], '/')) argv[0] = strrchr(argv[0], '/')+1; -- 2.26.2