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
+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.
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)),
#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 };
#define setpgrp(a,b) setpgrp()
#endif
+int dup_tty(int);
+
/*
* init_termbuf()
* copy_termbuf(cp)
* that is necessary. The return value is a file descriptor
* for the slave side.
*/
- int
+void
getptyslave()
{
int t = -1;
char **envp;
envp = envinit;
- if (*envp = getenv("TZ"))
+ if ((*envp = getenv("TZ")))
*envp++ -= 3;
#if defined(CRAY) || defined(__hpux)
else
int autologin;
char *name;
{
- register char *cp;
register char **argv;
char **addarg();
extern char *getenv();
- register int pid = getpid();
#ifdef SOLARIS
char *term;
# endif /* SO_SEC_MULTI */
#endif /* _SC_CRAY_SECURE_SYS */
+
#ifdef KRB5
#include "krb5.h"
#endif
#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;
#endif /* ! STREAMPTY */
void doit P((struct sockaddr_in *));
+int terminaltypeok P((char *));
int hostinfo = 1; /* do we print login banner? */
return banner;
}
+int
main(argc, argv)
int argc;
char *argv[];
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) {
#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
*/
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;