From: Theodore Tso Date: Thu, 7 Nov 1996 17:04:14 +0000 (+0000) Subject: Check the error return from krb5_init_context(), and print an error X-Git-Tag: krb5-1.0-freeze1~110 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=00a455775dcd98cc310aeb9e7e353d522650d3cb;p=krb5.git Check the error return from krb5_init_context(), and print an error message if neceesary. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9315 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/clients/klist/ChangeLog b/src/clients/klist/ChangeLog index c24581302..8b0051b4c 100644 --- a/src/clients/klist/ChangeLog +++ b/src/clients/klist/ChangeLog @@ -1,3 +1,8 @@ +Wed Nov 6 12:02:59 1996 Theodore Ts'o + + * klist.c (main): Check the error return from krb5_init_context(), + and print an error message if neceesary. + Tue Sep 10 14:14:21 1996 Tom Yu * klist.M: remove ".so man1/header.doc" diff --git a/src/clients/klist/klist.c b/src/clients/klist/klist.c index d4d40c3ff..c97b355a8 100644 --- a/src/clients/klist/klist.c +++ b/src/clients/klist/klist.c @@ -78,12 +78,16 @@ main(argc, argv) int argc; char **argv; { + krb5_error_code retval; int code; char *name; int mode; - 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); + } progname = (strrchr(*argv, '/') ? strrchr(*argv, '/')+1 : argv[0]);