aboutsummaryrefslogtreecommitdiff
path: root/secure/usr.bin/telnet
diff options
context:
space:
mode:
authorDima Ruban <dima@FreeBSD.org>1995-02-17 03:57:00 +0000
committerDima Ruban <dima@FreeBSD.org>1995-02-17 03:57:00 +0000
commit399e5b4411babf281130cb33fa563b4d701de467 (patch)
tree5170c2e6e8f17221fe040f808be363df9e138fce /secure/usr.bin/telnet
parent571a258ad5477cc7b4c1c44874dc8f2f83716491 (diff)
downloadsrc-399e5b4411babf281130cb33fa563b4d701de467.tar.gz
src-399e5b4411babf281130cb33fa563b4d701de467.zip
Security fixes.
CERT Advisory CA-95:03.telnet.encryption Obtained from: CERT
Notes
Notes: svn path=/head/; revision=6514
Diffstat (limited to 'secure/usr.bin/telnet')
-rw-r--r--secure/usr.bin/telnet/commands.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/secure/usr.bin/telnet/commands.c b/secure/usr.bin/telnet/commands.c
index a7224d18ac30..dbbac4961c30 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) {