diff options
author | Theodore Tso <tytso@mit.edu> | 1995-03-24 22:42:59 +0000 |
---|---|---|
committer | Theodore Tso <tytso@mit.edu> | 1995-03-24 22:42:59 +0000 |
commit | 95376cfaffbbe95f04b116ee05dda778da9667b5 (patch) | |
tree | 06ce71a3b5d85341c891c2e360fc7992b277e03e /src | |
parent | cce1b33b1a5ac377a70128184d10c75105eefe48 (diff) | |
download | krb5-95376cfaffbbe95f04b116ee05dda778da9667b5.tar.gz krb5-95376cfaffbbe95f04b116ee05dda778da9667b5.tar.xz krb5-95376cfaffbbe95f04b116ee05dda778da9667b5.zip |
kinit.c (main): Remove the call to krb5_os_localaddr() since
get_in_tkt_XXXX will default appropriately.
kinit.c (main): Kinit will print an error when there are two
many arguments.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5237 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r-- | src/clients/kinit/ChangeLog | 8 | ||||
-rw-r--r-- | src/clients/kinit/kinit.c | 18 |
2 files changed, 16 insertions, 10 deletions
diff --git a/src/clients/kinit/ChangeLog b/src/clients/kinit/ChangeLog index 7fc5207a13..d852c5d7ac 100644 --- a/src/clients/kinit/ChangeLog +++ b/src/clients/kinit/ChangeLog @@ -1,3 +1,11 @@ +Fri Mar 24 14:45:00 1995 <tytso@rsx-11.mit.edu> + + * kinit.c (main): Remove the call to krb5_os_localaddr() since + get_in_tkt_XXXX will default appropriately. + + * kinit.c (main): Kinit will print an error when there are two + many arguments. + Thu Mar 2 12:31:49 1995 Theodore Y. Ts'o <tytso@dcl> * Makefile.in (ISODELIB): Remove reference to $(ISODELIB). diff --git a/src/clients/kinit/kinit.c b/src/clients/kinit/kinit.c index 9a2572223e..e1516b3c1e 100644 --- a/src/clients/kinit/kinit.c +++ b/src/clients/kinit/kinit.c @@ -73,7 +73,6 @@ main(argc, argv) int options = KRB5_DEFAULT_OPTIONS; int option; int errflg = 0; - krb5_address **my_addresses; krb5_error_code code; krb5_principal me; krb5_principal server; @@ -155,6 +154,12 @@ main(argc, argv) } } + if (argc - optind > 1) { + fprintf(stderr, "Extra arguments (starting with \"%s\").\n", + argv[optind+1]); + errflg++; + } + if (errflg) { fprintf(stderr, "Usage: %s [-r time] [-puf] [-l lifetime] [-c cachename] [-k] [-t keytab] [principal]\n", argv[0]); exit(2); @@ -231,11 +236,6 @@ main(argc, argv) my_creds.server = server; - code = krb5_os_localaddr(&my_addresses); - if (code != 0) { - com_err (argv[0], code, "when getting my address"); - exit(1); - } if (code = krb5_timeofday(kcontext, &now)) { com_err(argv[0], code, "while getting time of day"); exit(1); @@ -258,22 +258,20 @@ main(argc, argv) fprintf(stderr, "Error while reading password for '%s'\n", client_name); memset(password, 0, sizeof(password)); - krb5_free_addresses(kcontext, my_addresses); exit(1); } - code = krb5_get_in_tkt_with_password(kcontext, options, my_addresses, + code = krb5_get_in_tkt_with_password(kcontext, options, 0, NULL, preauth, password, ccache, &my_creds, 0); memset(password, 0, sizeof(password)); } else { - code = krb5_get_in_tkt_with_keytab(kcontext, options, my_addresses, + code = krb5_get_in_tkt_with_keytab(kcontext, options, 0, NULL, preauth, keytab, ccache, &my_creds, 0); } krb5_free_principal(kcontext, server); - krb5_free_addresses(kcontext, my_addresses); if (code) { if (code == KRB5KRB_AP_ERR_BAD_INTEGRITY) |