diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | session.c | 5 |
2 files changed, 7 insertions, 3 deletions
@@ -1,3 +1,6 @@ | |||
1 | 20010322 | ||
2 | - (djm) Better AIX no tty fix, spotted by Gert Doering <gert@greenie.muc.de> | ||
3 | |||
1 | 20010321 | 4 | 20010321 |
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 $ |
@@ -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)); |