diff options
Diffstat (limited to 'crypto/heimdal/kpasswd/kpasswd.c')
-rw-r--r-- | crypto/heimdal/kpasswd/kpasswd.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/crypto/heimdal/kpasswd/kpasswd.c b/crypto/heimdal/kpasswd/kpasswd.c index f072804dbfcb..28de85396913 100644 --- a/crypto/heimdal/kpasswd/kpasswd.c +++ b/crypto/heimdal/kpasswd/kpasswd.c @@ -32,7 +32,7 @@ */ #include "kpasswd_locl.h" -RCSID("$Id: kpasswd.c,v 1.21 2000/01/28 03:19:32 assar Exp $"); +RCSID("$Id: kpasswd.c,v 1.23 2000/12/31 07:48:34 assar Exp $"); static int version_flag; static int help_flag; @@ -43,12 +43,9 @@ static struct getargs args[] = { }; static void -usage (int ret) +usage (int ret, struct getargs *a, int num_args) { - arg_printusage (args, - sizeof(args)/sizeof(*args), - NULL, - "[principal]"); + arg_printusage (a, num_args, NULL, "[principal]"); exit (ret); } @@ -66,10 +63,10 @@ main (int argc, char **argv) char pwbuf[BUFSIZ]; optind = krb5_program_setup(&context, argc, argv, - args, sizeof(args) / sizeof(args[0]), NULL); + args, sizeof(args) / sizeof(args[0]), usage); if (help_flag) - usage (0); + usage (0, args, sizeof(args) / sizeof(args[0])); if(version_flag){ print_version (NULL); @@ -86,11 +83,11 @@ main (int argc, char **argv) argv += optind; if (argc > 1) - usage(1); + usage (1, args, sizeof(args) / sizeof(args[0])); ret = krb5_init_context (&context); if (ret) - errx (1, "krb5_init_context: %s", krb5_get_err_text(context, ret)); + errx (1, "krb5_init_context failed: %d", ret); if(argv[0]) { ret = krb5_parse_name (context, argv[0], &principal); |