summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEzra Peisach <epeisach@mit.edu>2001-06-07 17:05:31 +0000
committerEzra Peisach <epeisach@mit.edu>2001-06-07 17:05:31 +0000
commit4e82cbd918b7b5eefc10a680bc346fd862da9850 (patch)
tree2e2807071a297d58f690cfce3f31c776fcefe731 /src
parent5da3eb2a458d1f11f1650f2a30ec33ac18eb247d (diff)
downloadkrb5-4e82cbd918b7b5eefc10a680bc346fd862da9850.tar.gz
krb5-4e82cbd918b7b5eefc10a680bc346fd862da9850.tar.xz
krb5-4e82cbd918b7b5eefc10a680bc346fd862da9850.zip
* ext.h: Remove unused prototype for start_slave() and replace
with one for startslave(). * state.c: Add libtlnet/encrypt.h for missing prototypes. * sys_term.c: Add prototype for dup_tty(). Change getptyslave() from int to void. Cleanup an assignment in conditional warning. * telnetd.c: Include libtelnet/misc-proto.h. Declare return from terminaltypeok() and main() as int. * utility.c: Include libtelnet/auth.h and libtelnet/encrypt.h for prototypes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13286 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/appl/telnet/telnetd/ChangeLog16
-rw-r--r--src/appl/telnet/telnetd/ext.h6
-rw-r--r--src/appl/telnet/telnetd/state.c3
-rw-r--r--src/appl/telnet/telnetd/sys_term.c8
-rw-r--r--src/appl/telnet/telnetd/telnetd.c14
-rw-r--r--src/appl/telnet/telnetd/utility.c11
6 files changed, 44 insertions, 14 deletions
diff --git a/src/appl/telnet/telnetd/ChangeLog b/src/appl/telnet/telnetd/ChangeLog
index b9ba7eb1e4..a63d556625 100644
--- a/src/appl/telnet/telnetd/ChangeLog
+++ b/src/appl/telnet/telnetd/ChangeLog
@@ -1,3 +1,19 @@
+2001-06-07 Ezra Peisach <epeisach@mit.edu>
+
+ * ext.h: Remove unused prototype for start_slave() and replace
+ with one for startslave().
+
+ * state.c: Add libtlnet/encrypt.h for missing prototypes.
+
+ * sys_term.c: Add prototype for dup_tty(). Change getptyslave()
+ from int to void. Cleanup an assignment in conditional warning.
+
+ * telnetd.c: Include libtelnet/misc-proto.h. Declare return from
+ terminaltypeok() and main() as int.
+
+ * utility.c: Include libtelnet/auth.h and libtelnet/encrypt.h for
+ prototypes.
+
2001-04-27 Ken Raeburn <raeburn@mit.edu>
* telnetd.c (valid_opts): Note that 'w' takes a parameter.
diff --git a/src/appl/telnet/telnetd/ext.h b/src/appl/telnet/telnetd/ext.h
index 2ff53e3e35..8f879d3519 100644
--- a/src/appl/telnet/telnetd/ext.h
+++ b/src/appl/telnet/telnetd/ext.h
@@ -141,11 +141,7 @@ extern void
set_termbuf P((void)),
start_login P((char *, int, char *)),
start_slc P((int)),
-#if defined(AUTHENTICATION)
- start_slave P((char *)),
-#else
- start_slave P((char *, int, char *)),
-#endif
+ startslave P((char *, int, char *)),
suboption P((void)),
telrcv P((void)),
ttloop P((void)),
diff --git a/src/appl/telnet/telnetd/state.c b/src/appl/telnet/telnetd/state.c
index 33743e43ed..66f2738cbc 100644
--- a/src/appl/telnet/telnetd/state.c
+++ b/src/appl/telnet/telnetd/state.c
@@ -37,6 +37,9 @@
#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/src/appl/telnet/telnetd/sys_term.c b/src/appl/telnet/telnetd/sys_term.c
index b79209d57a..18251b6ceb 100644
--- a/src/appl/telnet/telnetd/sys_term.c
+++ b/src/appl/telnet/telnetd/sys_term.c
@@ -193,6 +193,8 @@ int ttyfd = -1;
#define setpgrp(a,b) setpgrp()
#endif
+int dup_tty(int);
+
/*
* init_termbuf()
* copy_termbuf(cp)
@@ -904,7 +906,7 @@ tty_isnewmap()
* that is necessary. The return value is a file descriptor
* for the slave side.
*/
- int
+void
getptyslave()
{
int t = -1;
@@ -1188,7 +1190,7 @@ init_env()
char **envp;
envp = envinit;
- if (*envp = getenv("TZ"))
+ if ((*envp = getenv("TZ")))
*envp++ -= 3;
#if defined(CRAY) || defined(__hpux)
else
@@ -1213,11 +1215,9 @@ start_login(host, autologin, name)
int autologin;
char *name;
{
- register char *cp;
register char **argv;
char **addarg();
extern char *getenv();
- register int pid = getpid();
#ifdef SOLARIS
char *term;
diff --git a/src/appl/telnet/telnetd/telnetd.c b/src/appl/telnet/telnetd/telnetd.c
index 39c1948ca9..6e940f9826 100644
--- a/src/appl/telnet/telnetd/telnetd.c
+++ b/src/appl/telnet/telnetd/telnetd.c
@@ -74,6 +74,7 @@ struct socket_security ss;
# endif /* SO_SEC_MULTI */
#endif /* _SC_CRAY_SECURE_SYS */
+
#ifdef KRB5
#include "krb5.h"
#endif
@@ -86,6 +87,9 @@ struct socket_security ss;
#include <libtelnet/encrypt.h>
#include <libtelnet/enc-proto.h>
#endif
+#if defined(AUTHENTICATION) || defined(ENCRYPTION)
+#include <libtelnet/misc-proto.h>
+#endif
int registerd_host_only = 0;
@@ -128,6 +132,7 @@ char ptyibuf2[BUFSIZ];
#endif /* ! STREAMPTY */
void doit P((struct sockaddr_in *));
+int terminaltypeok P((char *));
int hostinfo = 1; /* do we print login banner? */
@@ -206,6 +211,7 @@ get_default_IM()
return banner;
}
+int
main(argc, argv)
int argc;
char *argv[];
@@ -945,16 +951,18 @@ extern void telnet P((int, int, char *));
void doit(who)
struct sockaddr_in *who;
{
- char *host, *inet_ntoa();
+ char *inet_ntoa();
struct hostent *hp;
int level;
+#if defined(_SC_CRAY_SECURE_SYS)
int ptynum;
+#endif
char user_name[256];
-long retval;
+ long retval;
/*
* Find an available pty to use.
*/
-pty_init();
+ pty_init();
if ((retval = pty_getpty(&pty, line, 17)) != 0) {
diff --git a/src/appl/telnet/telnetd/utility.c b/src/appl/telnet/telnetd/utility.c
index 408c6f4adf..8b0dde0cbd 100644
--- a/src/appl/telnet/telnetd/utility.c
+++ b/src/appl/telnet/telnetd/utility.c
@@ -40,6 +40,13 @@
#include <sys/utsname.h>
#endif
+#if defined(AUTHENTICATION)
+#include <libtelnet/auth.h>
+#endif
+#ifdef ENCRYPTION
+#include <libtelnet/encrypt.h>
+#endif
+
/*
* utility functions performing io related tasks
*/
@@ -1143,12 +1150,12 @@ printsub(direction, pointer, length)
break;
case ENCRYPT_ENC_KEYID:
- sprintf(nfrontp, " ENC_KEYID", pointer[1]);
+ sprintf(nfrontp, " ENC_KEYID");
nfrontp += strlen(nfrontp);
goto encommon;
case ENCRYPT_DEC_KEYID:
- sprintf(nfrontp, " DEC_KEYID", pointer[1]);
+ sprintf(nfrontp, " DEC_KEYID");
nfrontp += strlen(nfrontp);
goto encommon;