projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pty library
[unix-history]
/
usr
/
src
/
libexec
/
telnetd
/
telnetd.c
diff --git
a/usr/src/libexec/telnetd/telnetd.c
b/usr/src/libexec/telnetd/telnetd.c
index
2df6780
..
b6a70d5
100644
(file)
--- a/
usr/src/libexec/telnetd/telnetd.c
+++ b/
usr/src/libexec/telnetd/telnetd.c
@@
-12,7
+12,7
@@
char copyright[] =
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)telnetd.c 5.4
5
(Berkeley) %G%";
+static char sccsid[] = "@(#)telnetd.c 5.4
6
(Berkeley) %G%";
#endif /* not lint */
#include "telnetd.h"
#endif /* not lint */
#include "telnetd.h"
@@
-449,7
+449,14
@@
doit(who)
char *host, *inet_ntoa();
int t;
struct hostent *hp;
char *host, *inet_ntoa();
int t;
struct hostent *hp;
+#if BSD > 43
+ extern char *line;
+ if (openpty(&pty, &t, line, NULL, NULL) == -1)
+ fatal(net, "All network ports in use");
+ init_termbuf();
+#else
+
/*
* Find an available pty to use.
*/
/*
* Find an available pty to use.
*/
@@
-458,6
+465,7
@@
doit(who)
fatal(net, "All network ports in use");
t = getptyslave();
fatal(net, "All network ports in use");
t = getptyslave();
+#endif
/* get name of connected client */
hp = gethostbyaddr((char *)&who->sin_addr, sizeof (struct in_addr),
/* get name of connected client */
hp = gethostbyaddr((char *)&who->sin_addr, sizeof (struct in_addr),