diff options
author | dima <dima@FreeBSD.org> | 1995-02-17 03:57:00 +0000 |
---|---|---|
committer | dima <dima@FreeBSD.org> | 1995-02-17 03:57:00 +0000 |
commit | 937577d0307b7180b3754542f4112ea7f96771eb (patch) | |
tree | 5170c2e6e8f17221fe040f808be363df9e138fce /secure/usr.bin | |
parent | 10402791e8b5f057587b70e7c6d64f58f31c2a6a (diff) | |
download | FreeBSD-src-937577d0307b7180b3754542f4112ea7f96771eb.zip FreeBSD-src-937577d0307b7180b3754542f4112ea7f96771eb.tar.gz |
Security fixes.
CERT Advisory CA-95:03.telnet.encryption
Obtained from: CERT
Diffstat (limited to 'secure/usr.bin')
-rw-r--r-- | secure/usr.bin/telnet/commands.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/secure/usr.bin/telnet/commands.c b/secure/usr.bin/telnet/commands.c index a7224d1..dbbac49 100644 --- a/secure/usr.bin/telnet/commands.c +++ b/secure/usr.bin/telnet/commands.c @@ -1915,8 +1915,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)); @@ -1955,6 +1955,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) { @@ -2011,7 +2017,7 @@ struct encryptlist EncryptList[] = { EncryptEnable, 1, 1, 2 }, { "disable", "Disable encryption. ('encrypt enable ?' for more)", EncryptDisable, 0, 1, 2 }, - { "type", "Set encryptiong type. ('encrypt type ?' for more)", + { "type", "Set encryption type. ('encrypt type ?' for more)", EncryptType, 0, 1, 1 }, { "start", "Start encryption. ('encrypt start ?' for more)", EncryptStart, 1, 0, 1 }, @@ -2055,6 +2061,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) { |