|
Lines 57-62
Link Here
|
| 57 |
#include "canohost.h" |
57 |
#include "canohost.h" |
| 58 |
#include "session.h" |
58 |
#include "session.h" |
| 59 |
#include "monitor_wrap.h" |
59 |
#include "monitor_wrap.h" |
|
|
60 |
#if defined(_CRAY) && !defined(_CRAYSV2) |
| 61 |
#include <tmpdir.h> |
| 62 |
#endif |
| 60 |
|
63 |
|
| 61 |
#ifdef HAVE_CYGWIN |
64 |
#ifdef HAVE_CYGWIN |
| 62 |
#include <windows.h> |
65 |
#include <windows.h> |
|
Lines 517-526
Link Here
|
| 517 |
perror("dup2 stderr"); |
520 |
perror("dup2 stderr"); |
| 518 |
#endif /* USE_PIPES */ |
521 |
#endif /* USE_PIPES */ |
| 519 |
|
522 |
|
|
|
523 |
#if defined(_CRAY) && !defined(_CRAYSV2) |
| 524 |
cray_init_job(s->pw); /* set up cray jid and tmpdir */ |
| 525 |
#endif |
| 526 |
|
| 520 |
/* Do processing for the child (exec command etc). */ |
527 |
/* Do processing for the child (exec command etc). */ |
| 521 |
do_child(s, command); |
528 |
do_child(s, command); |
| 522 |
/* NOTREACHED */ |
529 |
/* NOTREACHED */ |
| 523 |
} |
530 |
} |
|
|
531 |
#if defined(_CRAY) && !defined(_CRAYSV2) |
| 532 |
signal(WJSIGNAL, cray_job_termination_handler); |
| 533 |
#endif /* _CRAY */ |
| 524 |
#ifdef HAVE_CYGWIN |
534 |
#ifdef HAVE_CYGWIN |
| 525 |
if (is_winnt) |
535 |
if (is_winnt) |
| 526 |
cygwin_set_impersonation_token(INVALID_HANDLE_VALUE); |
536 |
cygwin_set_impersonation_token(INVALID_HANDLE_VALUE); |
|
Lines 608-614
Link Here
|
| 608 |
/* record login, etc. similar to login(1) */ |
618 |
/* record login, etc. similar to login(1) */ |
| 609 |
#ifndef HAVE_OSF_SIA |
619 |
#ifndef HAVE_OSF_SIA |
| 610 |
if (!(options.use_login && command == NULL)) |
620 |
if (!(options.use_login && command == NULL)) |
|
|
621 |
{ |
| 622 |
#if defined(_CRAY) && !defined(_CRAYSV2) |
| 623 |
cray_init_job(s->pw); /* set up cray jid and tmpdir */ |
| 624 |
# endif /* _CRAY */ |
| 611 |
do_login(s, command); |
625 |
do_login(s, command); |
|
|
626 |
} |
| 612 |
# ifdef LOGIN_NEEDS_UTMPX |
627 |
# ifdef LOGIN_NEEDS_UTMPX |
| 613 |
else |
628 |
else |
| 614 |
do_pre_login(s); |
629 |
do_pre_login(s); |
|
Lines 619-624
Link Here
|
| 619 |
do_child(s, command); |
634 |
do_child(s, command); |
| 620 |
/* NOTREACHED */ |
635 |
/* NOTREACHED */ |
| 621 |
} |
636 |
} |
|
|
637 |
#if defined(_CRAY) && !defined(_CRAYSV2) |
| 638 |
signal(WJSIGNAL, cray_job_termination_handler); |
| 639 |
#endif /* _CRAY */ |
| 622 |
#ifdef HAVE_CYGWIN |
640 |
#ifdef HAVE_CYGWIN |
| 623 |
if (is_winnt) |
641 |
if (is_winnt) |
| 624 |
cygwin_set_impersonation_token(INVALID_HANDLE_VALUE); |
642 |
cygwin_set_impersonation_token(INVALID_HANDLE_VALUE); |
|
Lines 759-764
Link Here
|
| 759 |
printf("%s\n", aixloginmsg); |
777 |
printf("%s\n", aixloginmsg); |
| 760 |
#endif /* WITH_AIXAUTHENTICATE */ |
778 |
#endif /* WITH_AIXAUTHENTICATE */ |
| 761 |
|
779 |
|
|
|
780 |
#if !defined(_CRAY) || defined(_CRAYSV2) |
| 762 |
if (options.print_lastlog && s->last_login_time != 0) { |
781 |
if (options.print_lastlog && s->last_login_time != 0) { |
| 763 |
time_string = ctime(&s->last_login_time); |
782 |
time_string = ctime(&s->last_login_time); |
| 764 |
if (strchr(time_string, '\n')) |
783 |
if (strchr(time_string, '\n')) |
|
Lines 769-774
Link Here
|
| 769 |
printf("Last login: %s from %s\r\n", time_string, |
788 |
printf("Last login: %s from %s\r\n", time_string, |
| 770 |
s->hostname); |
789 |
s->hostname); |
| 771 |
} |
790 |
} |
|
|
791 |
#endif /* ! _CRAY */ |
| 772 |
|
792 |
|
| 773 |
do_motd(); |
793 |
do_motd(); |
| 774 |
} |
794 |
} |
|
Lines 1020-1025
Link Here
|
| 1020 |
child_set_env(&env, &envsize, "SSH_ORIGINAL_COMMAND", |
1040 |
child_set_env(&env, &envsize, "SSH_ORIGINAL_COMMAND", |
| 1021 |
original_command); |
1041 |
original_command); |
| 1022 |
|
1042 |
|
|
|
1043 |
#if defined(_CRAY) && !defined(_CRAYSV2) |
| 1044 |
if (cray_tmpdir[0] != '\0') |
| 1045 |
child_set_env(&env, &envsize, "TMPDIR", cray_tmpdir); |
| 1046 |
#endif /* _CRAY */ |
| 1047 |
|
| 1023 |
#ifdef _AIX |
1048 |
#ifdef _AIX |
| 1024 |
{ |
1049 |
{ |
| 1025 |
char *cp; |
1050 |
char *cp; |
|
Lines 1259-1264
Link Here
|
| 1259 |
/* login(1) is only called if we execute the login shell */ |
1284 |
/* login(1) is only called if we execute the login shell */ |
| 1260 |
if (options.use_login && command != NULL) |
1285 |
if (options.use_login && command != NULL) |
| 1261 |
options.use_login = 0; |
1286 |
options.use_login = 0; |
|
|
1287 |
|
| 1288 |
#if defined(_CRAY) && !defined(_CRAYSV2) |
| 1289 |
cray_setup(pw->pw_uid, pw->pw_name, command); |
| 1290 |
#endif /* _CRAY */ |
| 1262 |
|
1291 |
|
| 1263 |
/* |
1292 |
/* |
| 1264 |
* Login(1) does this as well, and it needs uid 0 for the "-h" |
1293 |
* Login(1) does this as well, and it needs uid 0 for the "-h" |