diff options
-rw-r--r-- | libexec/telnetd/ext.h | 3 | ||||
-rw-r--r-- | libexec/telnetd/slc.c | 6 | ||||
-rw-r--r-- | libexec/telnetd/state.c | 7 | ||||
-rw-r--r-- | libexec/telnetd/sys_term.c | 6 | ||||
-rw-r--r-- | libexec/telnetd/telnetd.c | 11 | ||||
-rw-r--r-- | libexec/telnetd/utility.c | 12 |
6 files changed, 30 insertions, 15 deletions
diff --git a/libexec/telnetd/ext.h b/libexec/telnetd/ext.h index b059393c6a0..75d2ac022e1 100644 --- a/libexec/telnetd/ext.h +++ b/libexec/telnetd/ext.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ext.h,v 1.4 1998/03/12 04:53:10 art Exp $ */ +/* $OpenBSD: ext.h,v 1.5 1998/03/25 18:43:44 art Exp $ */ /* $NetBSD: ext.h,v 1.6 1996/02/28 20:38:13 thorpej Exp $ */ /* @@ -159,6 +159,7 @@ extern int getpty P((int *)), #endif login_tty P((int)), + output_data P((const char *, ...)), spcset P((int, cc_t *, cc_t **)), stilloob P((int)), terminit P((void)), diff --git a/libexec/telnetd/slc.c b/libexec/telnetd/slc.c index f2cf2a3ee99..2c4424b900d 100644 --- a/libexec/telnetd/slc.c +++ b/libexec/telnetd/slc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: slc.c,v 1.2 1996/03/28 23:21:58 niklas Exp $ */ +/* $OpenBSD: slc.c,v 1.3 1998/03/25 18:43:45 art Exp $ */ /* $NetBSD: slc.c,v 1.5 1996/02/28 20:38:16 thorpej Exp $ */ /* @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)slc.c 8.1 (Berkeley) 6/4/93"; static char rcsid[] = "$NetBSD: slc.c,v 1.5 1996/02/28 20:38:16 thorpej Exp $"; #else -static char rcsid[] = "$OpenBSD: slc.c,v 1.2 1996/03/28 23:21:58 niklas Exp $"; +static char rcsid[] = "$OpenBSD: slc.c,v 1.3 1998/03/25 18:43:45 art Exp $"; #endif #endif /* not lint */ @@ -290,7 +290,7 @@ process_slc(func, flag, val) */ void change_slc(func, flag, val) - register char func, flag; + register int func, flag; register cc_t val; { register int hislevel, mylevel; diff --git a/libexec/telnetd/state.c b/libexec/telnetd/state.c index 8cea155050a..2ba68666121 100644 --- a/libexec/telnetd/state.c +++ b/libexec/telnetd/state.c @@ -1,4 +1,4 @@ -/* $OpenBSD: state.c,v 1.6 1998/03/12 04:53:12 art Exp $ */ +/* $OpenBSD: state.c,v 1.7 1998/03/25 18:43:46 art Exp $ */ /* $NetBSD: state.c,v 1.9 1996/02/28 20:38:19 thorpej Exp $ */ /* @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)state.c 8.5 (Berkeley) 5/30/95"; static char rcsid[] = "$NetBSD: state.c,v 1.9 1996/02/28 20:38:19 thorpej Exp $"; #else -static char rcsid[] = "$OpenBSD: state.c,v 1.6 1998/03/12 04:53:12 art Exp $"; +static char rcsid[] = "$OpenBSD: state.c,v 1.7 1998/03/25 18:43:46 art Exp $"; #endif #endif /* not lint */ @@ -47,6 +47,9 @@ static char rcsid[] = "$OpenBSD: state.c,v 1.6 1998/03/12 04:53:12 art Exp $"; #if defined(AUTHENTICATION) #include <libtelnet/auth.h> #endif +#if defined(ENCRYPTION) +#include <libtelnet/encrypt.h> +#endif unsigned char doopt[] = { IAC, DO, '%', 'c', 0 }; unsigned char dont[] = { IAC, DONT, '%', 'c', 0 }; diff --git a/libexec/telnetd/sys_term.c b/libexec/telnetd/sys_term.c index b4c07d09e4f..35ba6a1f1ed 100644 --- a/libexec/telnetd/sys_term.c +++ b/libexec/telnetd/sys_term.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_term.c,v 1.9 1998/03/12 04:53:14 art Exp $ */ +/* $OpenBSD: sys_term.c,v 1.10 1998/03/25 18:43:48 art Exp $ */ /* $NetBSD: sys_term.c,v 1.9 1996/03/20 04:25:53 tls Exp $ */ /* @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)sys_term.c 8.4+1 (Berkeley) 5/30/95"; static char rcsid[] = "$NetBSD: sys_term.c,v 1.8 1996/02/28 20:38:21 thorpej Exp $"; #else -static char rcsid[] = "$OpenBSD: sys_term.c,v 1.9 1998/03/12 04:53:14 art Exp $"; +static char rcsid[] = "$OpenBSD: sys_term.c,v 1.10 1998/03/25 18:43:48 art Exp $"; #endif #endif /* not lint */ @@ -1573,7 +1573,7 @@ start_login(host, autologin, name) char defent[TABBUFSIZ]; char defstrs[TABBUFSIZ]; #undef TABBUFSIZ - char *loginprog; + char *loginprog = NULL; #ifdef UTMPX register int pid = getpid(); struct utmpx utmpx; diff --git a/libexec/telnetd/telnetd.c b/libexec/telnetd/telnetd.c index 87dc2f14c80..1312d429587 100644 --- a/libexec/telnetd/telnetd.c +++ b/libexec/telnetd/telnetd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: telnetd.c,v 1.8 1998/03/12 04:53:15 art Exp $ */ +/* $OpenBSD: telnetd.c,v 1.9 1998/03/25 18:43:49 art Exp $ */ /* $NetBSD: telnetd.c,v 1.6 1996/03/20 04:25:57 tls Exp $ */ /* @@ -45,7 +45,7 @@ static char copyright[] = static char sccsid[] = "@(#)telnetd.c 8.4 (Berkeley) 5/30/95"; static char rcsid[] = "$NetBSD: telnetd.c,v 1.5 1996/02/28 20:38:23 thorpej Exp $"; #else -static char rcsid[] = "$OpenBSD: telnetd.c,v 1.8 1998/03/12 04:53:15 art Exp $"; +static char rcsid[] = "$OpenBSD: telnetd.c,v 1.9 1998/03/25 18:43:49 art Exp $"; #endif #endif /* not lint */ @@ -92,6 +92,10 @@ struct socket_security ss; #include <libtelnet/auth.h> int auth_level = 0; #endif +#if defined(ENCRYPTION) +#include <libtelnet/encrypt.h> +#include <libtelnet/misc-proto.h> +#endif #if defined(SecurID) int require_SecurID = 0; #endif @@ -539,6 +543,7 @@ main(argc, argv) net = 0; doit(&from); /* NOTREACHED */ + return (0); } /* end of main */ void @@ -810,7 +815,7 @@ extern void telnet P((int, int, char *)); doit(who) struct sockaddr_in *who; { - char *host, *inet_ntoa(); + char *host = NULL, *inet_ntoa(); struct hostent *hp; int level; int ptynum; diff --git a/libexec/telnetd/utility.c b/libexec/telnetd/utility.c index 85e01b9e1ff..65df58691f0 100644 --- a/libexec/telnetd/utility.c +++ b/libexec/telnetd/utility.c @@ -1,4 +1,4 @@ -/* $OpenBSD: utility.c,v 1.10 1998/03/12 04:53:17 art Exp $ */ +/* $OpenBSD: utility.c,v 1.11 1998/03/25 18:43:50 art Exp $ */ /* $NetBSD: utility.c,v 1.9 1996/02/28 20:38:29 thorpej Exp $ */ /* @@ -39,13 +39,19 @@ static char sccsid[] = "@(#)utility.c 8.4 (Berkeley) 5/30/95"; static char rcsid[] = "$NetBSD: utility.c,v 1.9 1996/02/28 20:38:29 thorpej Exp $"; #else -static char rcsid[] = "$OpenBSD: utility.c,v 1.10 1998/03/12 04:53:17 art Exp $"; +static char rcsid[] = "$OpenBSD: utility.c,v 1.11 1998/03/25 18:43:50 art Exp $"; #endif #endif /* not lint */ #include <sys/utsname.h> #define PRINTOPTIONS #include "telnetd.h" +#if defined(AUTHENTICATION) +#include <libtelnet/auth.h> +#endif +#if defined(ENCRYPTION) +#include <libtelnet/encrypt.h> +#endif /* * utility functions performing io related tasks @@ -548,7 +554,7 @@ printsub(direction, pointer, length) unsigned char *pointer; /* where suboption data sits */ int length; /* length of suboption data */ { - register int i; + register int i = 0; char buf[512]; if (!(diagnostic & TD_OPTIONS)) |