1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-15 15:06:42 +00:00

sys_term.c: killed sleep(1) as this should no longer be a problem with

the move of startslave().
telnetd.c: fix bug introduced with the move of startslave()...the number
of arguments was wrong and "level" and "user_name" had to be made globals.
This commit is contained in:
David Greenman 1995-09-11 21:02:02 +00:00
parent 430ff9b689
commit b834e407de
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=10679
4 changed files with 6 additions and 18 deletions

View File

@ -1779,12 +1779,6 @@ start_login(host, autologin, name)
close(pty); close(pty);
#endif #endif
closelog(); closelog();
/*
* This sleep(1) is in here so that telnetd can
* finish up with the tty. There's a race condition
* the login banner message gets lost...
*/
sleep(1);
execv(_PATH_LOGIN, argv); execv(_PATH_LOGIN, argv);
syslog(LOG_ERR, "%s: %m\n", _PATH_LOGIN); syslog(LOG_ERR, "%s: %m\n", _PATH_LOGIN);

View File

@ -782,6 +782,8 @@ char remote_host_name[MAXHOSTNAMELEN];
extern void telnet P((int, int, char *)); extern void telnet P((int, int, char *));
int level;
char user_name[256];
/* /*
* Get a pty, scan input lines. * Get a pty, scan input lines.
*/ */
@ -791,9 +793,7 @@ doit(who)
char *host, *inet_ntoa(); char *host, *inet_ntoa();
int t; int t;
struct hostent *hp; struct hostent *hp;
int level;
int ptynum; int ptynum;
char user_name[256];
/* /*
* Find an available pty to use. * Find an available pty to use.
@ -1149,7 +1149,7 @@ telnet(f, p, host)
* now. We delay this until here to insure option negotiation * now. We delay this until here to insure option negotiation
* is complete. * is complete.
*/ */
startslave(host); startslave(host, level, user_name);
nfd = ((f > p) ? f : p) + 1; nfd = ((f > p) ? f : p) + 1;
for (;;) { for (;;) {

View File

@ -1779,12 +1779,6 @@ start_login(host, autologin, name)
close(pty); close(pty);
#endif #endif
closelog(); closelog();
/*
* This sleep(1) is in here so that telnetd can
* finish up with the tty. There's a race condition
* the login banner message gets lost...
*/
sleep(1);
execv(_PATH_LOGIN, argv); execv(_PATH_LOGIN, argv);
syslog(LOG_ERR, "%s: %m\n", _PATH_LOGIN); syslog(LOG_ERR, "%s: %m\n", _PATH_LOGIN);

View File

@ -782,6 +782,8 @@ char remote_host_name[MAXHOSTNAMELEN];
extern void telnet P((int, int, char *)); extern void telnet P((int, int, char *));
int level;
char user_name[256];
/* /*
* Get a pty, scan input lines. * Get a pty, scan input lines.
*/ */
@ -791,9 +793,7 @@ doit(who)
char *host, *inet_ntoa(); char *host, *inet_ntoa();
int t; int t;
struct hostent *hp; struct hostent *hp;
int level;
int ptynum; int ptynum;
char user_name[256];
/* /*
* Find an available pty to use. * Find an available pty to use.
@ -1149,7 +1149,7 @@ telnet(f, p, host)
* now. We delay this until here to insure option negotiation * now. We delay this until here to insure option negotiation
* is complete. * is complete.
*/ */
startslave(host); startslave(host, level, user_name);
nfd = ((f > p) ? f : p) + 1; nfd = ((f > p) ? f : p) + 1;
for (;;) { for (;;) {