summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1995-09-16 07:46:49 +0000
committerTheodore Tso <tytso@mit.edu>1995-09-16 07:46:49 +0000
commit74c30e067f9e48d734b73228044e9fc4a0d4f2df (patch)
tree3f01ab36b3d7bffddda20cf40fe2a9f5fa9bbf56
parent0713352c63ec19807060ad4581efe7856a7adced (diff)
downloadkrb5-74c30e067f9e48d734b73228044e9fc4a0d4f2df.tar.gz
krb5-74c30e067f9e48d734b73228044e9fc4a0d4f2df.tar.xz
krb5-74c30e067f9e48d734b73228044e9fc4a0d4f2df.zip
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
-rw-r--r--src/appl/simple/client/ChangeLog6
-rw-r--r--src/appl/simple/client/sim_client.c8
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 <tytso@dcl>
+
+ * 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 <tytso@dcl>
* 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);
}