diff options
author | kris <kris@FreeBSD.org> | 2000-09-04 08:43:05 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2000-09-04 08:43:05 +0000 |
commit | 2450bc1f18d21ce5bccd1b6288d976598449d0a1 (patch) | |
tree | e87cc3e6c12c935093e6f84a21a38ac5b387e957 /crypto/openssh/session.c | |
parent | a6dc2ae9af00de7afa6ff354c92a2016ecca8c5f (diff) | |
download | FreeBSD-src-2450bc1f18d21ce5bccd1b6288d976598449d0a1.zip FreeBSD-src-2450bc1f18d21ce5bccd1b6288d976598449d0a1.tar.gz |
ttyname was not being passed into do_login(), so we were erroneously picking
up the function definition from unistd.h instead. Use s->tty instead.
Submitted by: peter
Diffstat (limited to 'crypto/openssh/session.c')
-rw-r--r-- | crypto/openssh/session.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/openssh/session.c b/crypto/openssh/session.c index f56e629..a385c8e 100644 --- a/crypto/openssh/session.c +++ b/crypto/openssh/session.c @@ -637,7 +637,7 @@ do_exec_pty(Session *s, const char *command, struct passwd * pw) "Sorry -- your account has expired.\n"); log( "LOGIN %.200s REFUSED (EXPIRED) FROM %.200s ON TTY %.200s", - pw->pw_name, hostname, ttyname); + pw->pw_name, hostname, s->tty); exit(254); } else if (pw->pw_expire - tv.tv_sec < warntime && !quiet_login) @@ -647,11 +647,11 @@ do_exec_pty(Session *s, const char *command, struct passwd * pw) } #endif /* __FreeBSD__ */ #ifdef LOGIN_CAP - if (!auth_ttyok(lc, ttyname)) { + if (!auth_ttyok(lc, s->tty)) { (void)printf("Permission denied.\n"); log( "LOGIN %.200s REFUSED (TTY) FROM %.200s ON TTY %.200s", - pw->pw_name, hostname, ttyname); + pw->pw_name, hostname, s->tty); exit(254); } #endif /* LOGIN_CAP */ |