summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'session.c')
-rw-r--r--session.c6
1 files changed, 3 insertions, 3 deletions
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)
1053 switch, so we let login(1) to this for us. */ 1053 switch, so we let login(1) to this for us. */
1054 if (!options.use_login) { 1054 if (!options.use_login) {
1055#ifdef HAVE_OSF_SIA 1055#ifdef HAVE_OSF_SIA
1056 session_setup_sia(pw->pw_name, ttyname); 1056 session_setup_sia(pw->pw_name, s->tty);
1057#else /* HAVE_OSF_SIA */ 1057#else /* HAVE_OSF_SIA */
1058#ifdef HAVE_CYGWIN 1058#ifdef HAVE_CYGWIN
1059 if (is_winnt) { 1059 if (is_winnt) {
@@ -1134,10 +1134,10 @@ do_child(Session *s, const char *command)
1134 * other stuff is stored - a few applications 1134 * other stuff is stored - a few applications
1135 * actually use this and die if it's not set 1135 * actually use this and die if it's not set
1136 */ 1136 */
1137 cp = xmalloc(22 + strlen(ttyname) + 1137 cp = xmalloc(22 + strlen(s->tty) +
1138 2 * strlen(pw->pw_name)); 1138 2 * strlen(pw->pw_name));
1139 i = sprintf(cp, "LOGNAME=%s%cNAME=%s%cTTY=%s%c%c", 1139 i = sprintf(cp, "LOGNAME=%s%cNAME=%s%cTTY=%s%c%c",
1140 pw->pw_name, 0, pw->pw_name, 0, ttyname, 0,0); 1140 pw->pw_name, 0, pw->pw_name, 0, s->tty, 0,0);
1141 if (usrinfo(SETUINFO, cp, i) == -1) 1141 if (usrinfo(SETUINFO, cp, i) == -1)
1142 fatal("Couldn't set usrinfo: %s", 1142 fatal("Couldn't set usrinfo: %s",
1143 strerror(errno)); 1143 strerror(errno));