From 74c30e067f9e48d734b73228044e9fc4a0d4f2df Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Sat, 16 Sep 1995 07:46:49 +0000 Subject: [PATCH] Fix optional host parsing so that host is recognized as an argument without the -h option. Free the context and auth_context structures before exiting. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6803 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/simple/client/ChangeLog | 6 ++++++ src/appl/simple/client/sim_client.c | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/appl/simple/client/ChangeLog b/src/appl/simple/client/ChangeLog index d13e231c7..bf5f8d2e7 100644 --- a/src/appl/simple/client/ChangeLog +++ b/src/appl/simple/client/ChangeLog @@ -1,3 +1,9 @@ +Sat Sep 16 03:45:59 1995 Theodore Y. Ts'o + + * sim_client.c (main): Fix optional host parsing so that host is + recognized as an argument without the -h option. + Free the context and auth_context structures before exiting. + Fri Sep 15 04:59:30 1995 Theodore Y. Ts'o * sim_client.c (main): Added better options parsing for more diff --git a/src/appl/simple/client/sim_client.c b/src/appl/simple/client/sim_client.c index 15644ee7e..6a5af0116 100644 --- a/src/appl/simple/client/sim_client.c +++ b/src/appl/simple/client/sim_client.c @@ -127,10 +127,10 @@ main(argc, argv) } argc -= optind; argv += optind; - if (argc > 1) { + if (argc > 0) { if (hostname) usage(); - hostname = argv[1]; + hostname = argv[0]; } if (hostname == 0) { @@ -332,5 +332,9 @@ main(argc, argv) com_err(progname, errno, "while sending PRIV message"); printf("Sent encrypted message: %d bytes\n", i); krb5_xfree(packet.data); + + krb5_auth_con_free(context, auth_context); + krb5_free_context(context); + exit(0); } -- 2.26.2