[Bug 101] session.c modifications for correct UNICOS behavior
bugzilla-daemon at mindrot.org
bugzilla-daemon at mindrot.org
Tue Apr 23 08:43:06 EST 2002
http://bugzilla.mindrot.org/show_bug.cgi?id=101
------- Additional Comments From wendyp at cray.com 2002-04-23 08:43 -------
updated patches for 22 april snapshot:
--- session.c.orig Mon Apr 22 14:36:13 2002
+++ session.c Mon Apr 22 16:31:15 2002
@@ -64,6 +64,10 @@
#define is_winnt (GetVersion() < 0x80000000)
#endif
+#ifdef _CRAY
+#include <tmpdir.h>
+#endif /* _CRAY */
+
/* func */
Session *session_new(void);
@@ -425,11 +429,17 @@
if (dup2(err[0], 2) < 0) /* stderr */
perror("dup2 stderr");
#endif /* USE_PIPES */
+#ifdef _CRAY
+ cray_init_job(s->pw); /* set up cray jid and tmpdir */
+#endif /* _CRAY */
/* Do processing for the child (exec command etc). */
do_child(s, command);
/* NOTREACHED */
}
+#ifdef _CRAY
+ signal(WJSIGNAL, cray_job_termination_handler);
+#endif /* _CRAY */
#ifdef HAVE_CYGWIN
if (is_winnt)
cygwin_set_impersonation_token(INVALID_HANDLE_VALUE);
@@ -517,7 +527,12 @@
/* record login, etc. similar to login(1) */
#ifndef HAVE_OSF_SIA
if (!(options.use_login && command == NULL))
+ {
+# ifdef _CRAY
+ cray_init_job(s->pw); /* set up cray jid and tmpdir */
+# endif /* _CRAY */
do_login(s, command);
+ }
# ifdef LOGIN_NEEDS_UTMPX
else
do_pre_login(s);
@@ -528,6 +543,9 @@
do_child(s, command);
/* NOTREACHED */
}
+#ifdef _CRAY
+ signal(WJSIGNAL, cray_job_termination_handler);
+#endif /* _CRAY */
#ifdef HAVE_CYGWIN
if (is_winnt)
cygwin_set_impersonation_token(INVALID_HANDLE_VALUE);
@@ -668,6 +686,7 @@
printf("%s\n", aixloginmsg);
#endif /* WITH_AIXAUTHENTICATE */
+#ifndef _CRAY
if (options.print_lastlog && s->last_login_time != 0) {
time_string = ctime(&s->last_login_time);
if (strchr(time_string, '\n'))
@@ -678,6 +697,7 @@
printf("Last login: %s from %s\r\n", time_string,
s->hostname);
}
+#endif /* ! _CRAY */
do_motd();
}
@@ -916,7 +936,10 @@
if (original_command)
child_set_env(&env, &envsize, "SSH_ORIGINAL_COMMAND",
original_command);
-
+#ifdef _CRAY
+ if (cray_tmpdir[0] != '\0')
+ child_set_env(&env, &envsize, "TMPDIR", cray_tmpdir);
+#endif /* _CRAY */
#ifdef _AIX
{
char *cp;
@@ -1151,6 +1174,7 @@
* Login(1) does this as well, and it needs uid 0 for the "-h"
* switch, so we let login(1) to this for us.
*/
+#ifndef _CRAY
if (!options.use_login) {
#ifdef HAVE_OSF_SIA
session_setup_sia(pw->pw_name, s->ttyfd == -1 ? NULL : s->tty);
@@ -1164,6 +1188,9 @@
do_setusercontext(pw);
#endif /* HAVE_OSF_SIA */
}
+#else
+ cray_setup(pw->pw_uid, pw->pw_name, command);
+#endif /* _CRAY */
/*
* Get the shell from the password data. An empty shell field is
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the openssh-unix-dev
mailing list