summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-03-21 11:11:57 +1100
committerDamien Miller <djm@mindrot.org>2001-03-21 11:11:57 +1100
commitbe08176963af1b75f6fff9c28e941763476eeb30 (patch)
tree474d5d13f8135329bc577c9c80879a59bc4d377c
parentd9d5ba2bbde89fe058d8db39d0ec3f1d4ec5e6f8 (diff)
- (djm) Fix ttyname breakage for AIX and Tru64. Patch from Steve
VanDevender <stevev@darkwing.uoregon.edu>
-rw-r--r--ChangeLog6
-rw-r--r--session.c6
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 @@
120010321
2 - (djm) Fix ttyname breakage for AIX and Tru64. Patch from Steve
3 VanDevender <stevev@darkwing.uoregon.edu>
4
120010320 520010320
2 - (bal) glob.c update to added GLOB_LIMITS (OpenBSD CVS). 6 - (bal) glob.c update to added GLOB_LIMITS (OpenBSD CVS).
3 - (bal) glob.c update to set gl_pathv to NULL (OpenBSD CVS). 7 - (bal) glob.c update to set gl_pathv to NULL (OpenBSD CVS).
@@ -4645,4 +4649,4 @@
4645 - Wrote replacements for strlcpy and mkdtemp 4649 - Wrote replacements for strlcpy and mkdtemp
4646 - Released 1.0pre1 4650 - Released 1.0pre1
4647 4651
4648$Id: ChangeLog,v 1.993 2001/03/20 04:46:50 tim Exp $ 4652$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)
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));