=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/login/login.c,v retrieving revision 1.62 retrieving revision 1.63 diff -c -r1.62 -r1.63 *** src/usr.bin/login/login.c 2014/05/20 01:25:23 1.62 --- src/usr.bin/login/login.c 2015/01/16 06:40:09 1.63 *************** *** 1,4 **** ! /* $OpenBSD: login.c,v 1.62 2014/05/20 01:25:23 guenther Exp $ */ /* $NetBSD: login.c,v 1.13 1996/05/15 23:50:16 jtc Exp $ */ /*- --- 1,4 ---- ! /* $OpenBSD: login.c,v 1.63 2015/01/16 06:40:09 deraadt Exp $ */ /* $NetBSD: login.c,v 1.13 1996/05/15 23:50:16 jtc Exp $ */ /*- *************** *** 70,76 **** * login -p (preserve existing environment; for getty) */ - #include #include #include #include --- 70,75 ---- *************** *** 93,98 **** --- 92,98 ---- #include #include #include + #include #include #include #include *************** *** 138,145 **** { char *domain, *p, *ttyn, *shell, *fullname, *instance; char *lipaddr, *script, *ripaddr, *style, *type, *fqdn; ! char tbuf[MAXPATHLEN + 2], tname[sizeof(_PATH_TTY) + 10]; ! char localhost[MAXHOSTNAMELEN], *copyright; char mail[sizeof(_PATH_MAILDIR) + 1 + NAME_MAX]; int ask, ch, cnt, fflag, pflag, quietlog, rootlogin, lastchance; int error, homeless, needto, authok, tries, backoff; --- 138,145 ---- { char *domain, *p, *ttyn, *shell, *fullname, *instance; char *lipaddr, *script, *ripaddr, *style, *type, *fqdn; ! char tbuf[PATH_MAX + 2], tname[sizeof(_PATH_TTY) + 10]; ! char localhost[HOST_NAME_MAX+1], *copyright; char mail[sizeof(_PATH_MAILDIR) + 1 + NAME_MAX]; int ask, ch, cnt, fflag, pflag, quietlog, rootlogin, lastchance; int error, homeless, needto, authok, tries, backoff; *************** *** 565,571 **** shell = login_getcapstr(lc, "shell", pwd->pw_shell, pwd->pw_shell); if (*shell == '\0') shell = _PATH_BSHELL; ! else if (strlen(shell) >= MAXPATHLEN) { syslog(LOG_ERR, "shell path too long: %s", shell); warnx("invalid shell"); quickexit(1); --- 565,571 ---- shell = login_getcapstr(lc, "shell", pwd->pw_shell, pwd->pw_shell); if (*shell == '\0') shell = _PATH_BSHELL; ! else if (strlen(shell) >= PATH_MAX) { syslog(LOG_ERR, "shell path too long: %s", shell); warnx("invalid shell"); quickexit(1);