Change prototypes of auth_enable() and auth_disable() to be a char *
authorTheodore Tso <tytso@mit.edu>
Tue, 8 Nov 1994 03:43:16 +0000 (03:43 +0000)
committerTheodore Tso <tytso@mit.edu>
Tue, 8 Nov 1994 03:43:16 +0000 (03:43 +0000)
Print an error message if there are no arguments to "auth" or
"encrypt", instead of core dumping.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4638 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/telnet/telnet/ChangeLog
src/appl/telnet/telnet/commands.c

index 38c8eb29dfd748ff51e803f654c06b39eb1a4042..1818f54aef05a59c181622926d61e7af5a6b7ef7 100644 (file)
@@ -1,3 +1,12 @@
+Mon Nov  7 22:40:17 1994  Theodore Y. Ts'o  (tytso@dcl)
+
+       * commands.c (auth_cmd, encrypt_cmd): Print an error message if
+               there are no arguments to "auth" or "encrypt", instead of
+               core dumping.
+
+       * commands.c (auth_enable, auth_disable): Change prototypes of
+               these routines to be a char *.
+
 Mon Oct  3 13:28:04 1994  Theodore Y. Ts'o  (tytso@dcl)
 
        * externs.h: The proper place to look for termios.h is
index 42c6e5328775639ddafc03a228989825f924387b..78870442870a7f60adef04efe6896ec69d7973a0 100644 (file)
@@ -1919,8 +1919,8 @@ struct authlist {
 };
 
 extern int
-       auth_enable P((int)),
-       auth_disable P((int)),
+       auth_enable P((char *)),
+       auth_disable P((char *)),
        auth_status P((void));
 static int
        auth_help P((void));
@@ -1959,6 +1959,12 @@ auth_cmd(argc, argv)
 {
     struct authlist *c;
 
+    if (argc < 2) {
+      fprintf(stderr,
+          "Need an argument to 'auth' command.  'auth ?' for help.\n");
+      return 0;
+    }
+
     c = (struct authlist *)
                genget(argv[1], (char **) AuthList, sizeof(struct authlist));
     if (c == 0) {
@@ -2059,6 +2065,12 @@ encrypt_cmd(argc, argv)
 {
     struct encryptlist *c;
 
+    if (argc < 2) {
+       fprintf(stderr,
+           "Need an argument to 'encrypt' command.  'encrypt ?' for help.\n");
+       return 0;
+    }
+
     c = (struct encryptlist *)
                genget(argv[1], (char **) EncryptList, sizeof(struct encryptlist));
     if (c == 0) {