summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-03-22 11:58:15 +1100
committerDamien Miller <djm@mindrot.org>2001-03-22 11:58:15 +1100
commitbebd8be67bd8fc8e832faf0ed635f9e8a46ca126 (patch)
tree6e7604355d4567bb677377311966a90ce7563abb
parentb69407dd7ada7f0c254fc538da8357e36a1edb7a (diff)
- (djm) Better AIX no tty fix, spotted by Gert Doering <gert@greenie.muc.de>
-rw-r--r--ChangeLog5
-rw-r--r--session.c5
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 6e9ace6aa..27b5ad971 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
120010322
2 - (djm) Better AIX no tty fix, spotted by Gert Doering <gert@greenie.muc.de>
3
120010321 420010321
2 - (djm) Fix ttyname breakage for AIX and Tru64. Patch from Steve 5 - (djm) Fix ttyname breakage for AIX and Tru64. Patch from Steve
3 VanDevender <stevev@darkwing.uoregon.edu> 6 VanDevender <stevev@darkwing.uoregon.edu>
@@ -4656,4 +4659,4 @@
4656 - Wrote replacements for strlcpy and mkdtemp 4659 - Wrote replacements for strlcpy and mkdtemp
4657 - Released 1.0pre1 4660 - Released 1.0pre1
4658 4661
4659$Id: ChangeLog,v 1.998 2001/03/21 05:13:03 djm Exp $ 4662$Id: ChangeLog,v 1.999 2001/03/22 00:58:15 djm Exp $
diff --git a/session.c b/session.c
index bed03c746..a794f3b2d 100644
--- a/session.c
+++ b/session.c
@@ -1134,11 +1134,12 @@ 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 if (s->ttyfd == -1)
1138 s->tty[0] = '\0';
1137 cp = xmalloc(22 + strlen(s->tty) + 1139 cp = xmalloc(22 + strlen(s->tty) +
1138 2 * strlen(pw->pw_name)); 1140 2 * strlen(pw->pw_name));
1139 i = sprintf(cp, "LOGNAME=%s%cNAME=%s%cTTY=%s%c%c", 1141 i = sprintf(cp, "LOGNAME=%s%cNAME=%s%cTTY=%s%c%c",
1140 pw->pw_name, 0, pw->pw_name, 0, 1142 pw->pw_name, 0, pw->pw_name, 0, s->tty, 0, 0);
1141 s->ttyfd == -1 ? "" : s->tty, 0,0);
1142 if (usrinfo(SETUINFO, cp, i) == -1) 1143 if (usrinfo(SETUINFO, cp, i) == -1)
1143 fatal("Couldn't set usrinfo: %s", 1144 fatal("Couldn't set usrinfo: %s",
1144 strerror(errno)); 1145 strerror(errno));