summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-03-21 16:13:03 +1100
committerDamien Miller <djm@mindrot.org>2001-03-21 16:13:03 +1100
commitb69407dd7ada7f0c254fc538da8357e36a1edb7a (patch)
tree84766c9fffb5751bffcf6efc0615b23995e67a57
parent4b4e2d31d66728b06a0a5defed21c2781e0f314a (diff)
- (djm) Correctly handle SIA and AIX when no tty present. Spotted and
suggested fix from Mike Battersby <mib@unimelb.edu.au>
-rw-r--r--ChangeLog4
-rw-r--r--session.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 0dd9f7bca..6e9ace6aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,8 @@
6 - (djm) Don't loop forever when changing password via PAM. Patch 6 - (djm) Don't loop forever when changing password via PAM. Patch
7 from Solar Designer <solar@openwall.com> 7 from Solar Designer <solar@openwall.com>
8 - (djm) Generate config files before build 8 - (djm) Generate config files before build
9 - (djm) Correctly handle SIA and AIX when no tty present. Spotted and
10 suggested fix from Mike Battersby <mib@unimelb.edu.au>
9 11
1020010320 1220010320
11 - (bal) glob.c update to added GLOB_LIMITS (OpenBSD CVS). 13 - (bal) glob.c update to added GLOB_LIMITS (OpenBSD CVS).
@@ -4654,4 +4656,4 @@
4654 - Wrote replacements for strlcpy and mkdtemp 4656 - Wrote replacements for strlcpy and mkdtemp
4655 - Released 1.0pre1 4657 - Released 1.0pre1
4656 4658
4657$Id: ChangeLog,v 1.997 2001/03/21 02:13:40 djm Exp $ 4659$Id: ChangeLog,v 1.998 2001/03/21 05:13:03 djm Exp $
diff --git a/session.c b/session.c
index 31a16dc7c..bed03c746 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, s->tty); 1056 session_setup_sia(pw->pw_name, s->ttyfd == -1 ? NULL : 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) {
@@ -1137,7 +1137,8 @@ do_child(Session *s, const char *command)
1137 cp = xmalloc(22 + strlen(s->tty) + 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, s->tty, 0,0); 1140 pw->pw_name, 0, pw->pw_name, 0,
1141 s->ttyfd == -1 ? "" : s->tty, 0,0);
1141 if (usrinfo(SETUINFO, cp, i) == -1) 1142 if (usrinfo(SETUINFO, cp, i) == -1)
1142 fatal("Couldn't set usrinfo: %s", 1143 fatal("Couldn't set usrinfo: %s",
1143 strerror(errno)); 1144 strerror(errno));