X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/e83bda0c3549a3d17cde4af234a884d0d8990ff2..58241a2921d89ba48deb3626d1c467dbd858913a:/usr/src/usr.bin/login/login.c diff --git a/usr/src/usr.bin/login/login.c b/usr/src/usr.bin/login/login.c index 97503f1416..002d6ba0e7 100644 --- a/usr/src/usr.bin/login/login.c +++ b/usr/src/usr.bin/login/login.c @@ -12,7 +12,7 @@ char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)login.c 5.61 (Berkeley) %G%"; +static char sccsid[] = "@(#)login.c 5.64 (Berkeley) %G%"; #endif /* not lint */ /* @@ -57,14 +57,6 @@ struct passwd *pwd; int failures; char term[64], *envinit[1], *hostname, *username, *tty; -struct sgttyb sgttyb; -struct tchars tc = { - CINTR, CQUIT, CSTART, CSTOP, CEOT, CBRK -}; -struct ltchars ltc = { - CSUSP, CDSUSP, CRPRNT, CDISCARD, CWERASE, CLNEXT -}; - char *months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; @@ -82,7 +74,7 @@ main(argc, argv) register int ch; register char *p; int ask, fflag, hflag, pflag, rflag, cnt; - int quietlog, ioctlval, rval; + int quietlog, rval; char *domain, *salt, *ttyn; char tbuf[MAXPATHLEN + 2], tname[sizeof(_PATH_TTY) + 10]; char localhost[MAXHOSTNAMELEN]; @@ -187,24 +179,6 @@ main(argc, argv) if (rflag) ask = 0; - ioctlval = 0; - (void)ioctl(0, TIOCLSET, &ioctlval); - (void)ioctl(0, TIOCNXCL, 0); - (void)fcntl(0, F_SETFL, ioctlval); - (void)ioctl(0, TIOCGETP, &sgttyb); - - /* - * If talking to an rlogin process, propagate the terminal type and - * baud rate across the network. - */ - if (rflag) - doremoteterm(&sgttyb); - sgttyb.sg_erase = CERASE; - sgttyb.sg_kill = CKILL; - (void)ioctl(0, TIOCSLTC, <c); - (void)ioctl(0, TIOCSETC, &tc); - (void)ioctl(0, TIOCSETP, &sgttyb); - for (cnt = getdtablesize(); cnt > 2; cnt--) close(cnt); @@ -219,9 +193,6 @@ main(argc, argv) tty = ttyn; for (cnt = 0;; ask = 1) { - ioctlval = TTYDISC; - (void)ioctl(0, TIOCSETD, &ioctlval); - if (ask) { fflag = 0; getloginname(); @@ -291,7 +262,6 @@ main(argc, argv) if (++cnt > 3) { if (cnt >= 10) { badlogin(username); - (void)ioctl(0, TIOCHPCL, (struct sgttyb *)NULL); sleepexit(1); } sleep((u_int)((cnt - 3) * 5)); @@ -375,12 +345,6 @@ main(argc, argv) dolastlog(quietlog); - if (!hflag && !rflag) { /* XXX */ - static struct winsize win = { 0, 0, 0, 0 }; - - (void)ioctl(0, TIOCSWINSZ, &win); - } - (void)chown(ttyn, pwd->pw_uid, (gr = getgrnam(TTYGRPNAME)) ? gr->gr_gid : pwd->pw_gid); (void)chmod(ttyn, 0620);