summaryrefslogtreecommitdiffstats
path: root/eBones/libexec/telnetd/telnetd.c
diff options
context:
space:
mode:
Diffstat (limited to 'eBones/libexec/telnetd/telnetd.c')
-rw-r--r--eBones/libexec/telnetd/telnetd.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/eBones/libexec/telnetd/telnetd.c b/eBones/libexec/telnetd/telnetd.c
index 40fdad5..5785279 100644
--- a/eBones/libexec/telnetd/telnetd.c
+++ b/eBones/libexec/telnetd/telnetd.c
@@ -32,13 +32,13 @@
*/
#ifndef lint
-static char copyright[] =
+static const char copyright[] =
"@(#) Copyright (c) 1989, 1993\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)telnetd.c 8.4 (Berkeley) 5/30/95";
+static const char sccsid[] = "@(#)telnetd.c 8.4 (Berkeley) 5/30/95";
#endif /* not lint */
#include "telnetd.h"
@@ -75,6 +75,10 @@ struct socket_security ss;
#include <libtelnet/auth.h>
int auth_level = 0;
#endif
+#if defined(ENCRYPTION)
+#include <libtelnet/encrypt.h>
+#endif
+#include <libtelnet/misc.h>
#if defined(SecurID)
int require_SecurID = 0;
#endif
@@ -101,8 +105,6 @@ char ptyibuf2[BUFSIZ];
unsigned char ctlbuf[BUFSIZ];
struct strbuf strbufc, strbufd;
-int readstream();
-
#else /* ! STREAMPTY */
/*
@@ -112,6 +114,13 @@ int readstream();
char ptyibuf[BUFSIZ], *ptyip = ptyibuf;
char ptyibuf2[BUFSIZ];
+# include <termcap.h>
+
+int readstream(int p, char *ibuf, int bufsize);
+void doit(struct sockaddr_in *who);
+int terminaltypeok(char *s);
+void startslave(char *host, int autologin, char *autoname);
+
#endif /* ! STREAMPTY */
int hostinfo = 1; /* do we print login banner? */
@@ -390,7 +399,7 @@ main(argc, argv)
usage();
/* NOT REACHED */
} else if (argc == 1) {
- if (sp = getservbyname(*argv, "tcp")) {
+ if ((sp = getservbyname(*argv, "tcp"))) {
sin.sin_port = sp->s_port;
} else {
sin.sin_port = atoi(*argv);
@@ -792,11 +801,11 @@ char user_name[256];
/*
* Get a pty, scan input lines.
*/
+void
doit(who)
struct sockaddr_in *who;
{
char *host, *inet_ntoa();
- int t;
struct hostent *hp;
int ptynum;
OpenPOWER on IntegriCloud