summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1994-11-08 03:43:16 +0000
committerTheodore Tso <tytso@mit.edu>1994-11-08 03:43:16 +0000
commit62b13623e977fc550b9b365d10c6c7d878bad0fe (patch)
tree98930e165809d4e3cea37b5bfcb4dfe69a03c7ae /src
parentc727a35124808dfa8435126cc50d241a416a0043 (diff)
Change prototypes of auth_enable() and auth_disable() to be a char *
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
Diffstat (limited to 'src')
-rw-r--r--src/appl/telnet/telnet/ChangeLog9
-rw-r--r--src/appl/telnet/telnet/commands.c16
2 files changed, 23 insertions, 2 deletions
diff --git a/src/appl/telnet/telnet/ChangeLog b/src/appl/telnet/telnet/ChangeLog
index 38c8eb29d..1818f54ae 100644
--- a/src/appl/telnet/telnet/ChangeLog
+++ b/src/appl/telnet/telnet/ChangeLog
@@ -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
diff --git a/src/appl/telnet/telnet/commands.c b/src/appl/telnet/telnet/commands.c
index 42c6e5328..788704428 100644
--- a/src/appl/telnet/telnet/commands.c
+++ b/src/appl/telnet/telnet/commands.c
@@ -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) {