From be08176963af1b75f6fff9c28e941763476eeb30 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 21 Mar 2001 11:11:57 +1100 Subject: - (djm) Fix ttyname breakage for AIX and Tru64. Patch from Steve VanDevender --- ChangeLog | 6 +++++- session.c | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index cc9aa378e..5fed6e4da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +20010321 + - (djm) Fix ttyname breakage for AIX and Tru64. Patch from Steve + VanDevender + 20010320 - (bal) glob.c update to added GLOB_LIMITS (OpenBSD CVS). - (bal) glob.c update to set gl_pathv to NULL (OpenBSD CVS). @@ -4645,4 +4649,4 @@ - Wrote replacements for strlcpy and mkdtemp - Released 1.0pre1 -$Id: ChangeLog,v 1.993 2001/03/20 04:46:50 tim Exp $ +$Id: ChangeLog,v 1.994 2001/03/21 00:11:57 djm Exp $ diff --git a/session.c b/session.c index 9c4828ac7..31a16dc7c 100644 --- a/session.c +++ b/session.c @@ -1053,7 +1053,7 @@ do_child(Session *s, const char *command) switch, so we let login(1) to this for us. */ if (!options.use_login) { #ifdef HAVE_OSF_SIA - session_setup_sia(pw->pw_name, ttyname); + session_setup_sia(pw->pw_name, s->tty); #else /* HAVE_OSF_SIA */ #ifdef HAVE_CYGWIN if (is_winnt) { @@ -1134,10 +1134,10 @@ do_child(Session *s, const char *command) * other stuff is stored - a few applications * actually use this and die if it's not set */ - cp = xmalloc(22 + strlen(ttyname) + + cp = xmalloc(22 + strlen(s->tty) + 2 * strlen(pw->pw_name)); i = sprintf(cp, "LOGNAME=%s%cNAME=%s%cTTY=%s%c%c", - pw->pw_name, 0, pw->pw_name, 0, ttyname, 0,0); + pw->pw_name, 0, pw->pw_name, 0, s->tty, 0,0); if (usrinfo(SETUINFO, cp, i) == -1) fatal("Couldn't set usrinfo: %s", strerror(errno)); -- cgit v1.2.3