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:
parent
430ff9b689
commit
b834e407de
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=10679
@ -1779,12 +1779,6 @@ start_login(host, autologin, name)
|
||||
close(pty);
|
||||
#endif
|
||||
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);
|
||||
|
||||
syslog(LOG_ERR, "%s: %m\n", _PATH_LOGIN);
|
||||
|
@ -782,6 +782,8 @@ char remote_host_name[MAXHOSTNAMELEN];
|
||||
|
||||
extern void telnet P((int, int, char *));
|
||||
|
||||
int level;
|
||||
char user_name[256];
|
||||
/*
|
||||
* Get a pty, scan input lines.
|
||||
*/
|
||||
@ -791,9 +793,7 @@ doit(who)
|
||||
char *host, *inet_ntoa();
|
||||
int t;
|
||||
struct hostent *hp;
|
||||
int level;
|
||||
int ptynum;
|
||||
char user_name[256];
|
||||
|
||||
/*
|
||||
* Find an available pty to use.
|
||||
@ -1149,7 +1149,7 @@ telnet(f, p, host)
|
||||
* now. We delay this until here to insure option negotiation
|
||||
* is complete.
|
||||
*/
|
||||
startslave(host);
|
||||
startslave(host, level, user_name);
|
||||
|
||||
nfd = ((f > p) ? f : p) + 1;
|
||||
for (;;) {
|
||||
|
@ -1779,12 +1779,6 @@ start_login(host, autologin, name)
|
||||
close(pty);
|
||||
#endif
|
||||
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);
|
||||
|
||||
syslog(LOG_ERR, "%s: %m\n", _PATH_LOGIN);
|
||||
|
@ -782,6 +782,8 @@ char remote_host_name[MAXHOSTNAMELEN];
|
||||
|
||||
extern void telnet P((int, int, char *));
|
||||
|
||||
int level;
|
||||
char user_name[256];
|
||||
/*
|
||||
* Get a pty, scan input lines.
|
||||
*/
|
||||
@ -791,9 +793,7 @@ doit(who)
|
||||
char *host, *inet_ntoa();
|
||||
int t;
|
||||
struct hostent *hp;
|
||||
int level;
|
||||
int ptynum;
|
||||
char user_name[256];
|
||||
|
||||
/*
|
||||
* Find an available pty to use.
|
||||
@ -1149,7 +1149,7 @@ telnet(f, p, host)
|
||||
* now. We delay this until here to insure option negotiation
|
||||
* is complete.
|
||||
*/
|
||||
startslave(host);
|
||||
startslave(host, level, user_name);
|
||||
|
||||
nfd = ((f > p) ? f : p) + 1;
|
||||
for (;;) {
|
||||
|
Loading…
Reference in New Issue
Block a user