Call for testing for 3.5 OpenSSH
Wendy Palm
wendyp at cray.com
Tue Sep 24 07:05:13 EST 2002
ben-
i have 4 patches left that have not been added that are absolutely
required to work on a cray system.
they were part of bug 367, but were not added with the rest.
do you want me to close that one and open a new one with only
these patches?
thanks,
wendy
diff -cr openssh/auth1.c openssh.cray/auth1.c
*** openssh/auth1.c Wed Sep 11 18:47:30 2002
--- openssh.cray/auth1.c Mon Sep 23 12:39:06 2002
***************
*** 25,32 ****
--- 25,36 ----
#include "channels.h"
#include "session.h"
#include "uidswap.h"
+ #if defined(_CRAY) && ! defined(_CRAYSV2)
+ #include <ia.h>
+ #endif /* _CRAY */
#include "monitor_wrap.h"
+
/* import */
extern ServerOptions options;
***************
*** 303,308 ****
--- 307,321 ----
if (!authctxt->valid && authenticated)
fatal("INTERNAL ERROR: authenticated invalid user %s",
authctxt->user);
+
+ # if defined(_CRAY) && ! defined(_CRAYSV2)
+ if (type == SSH_CMSG_AUTH_PASSWORD && !authenticated)
+ cray_login_failure(authctxt->user, IA_UDBERR);
+ if (authenticated && cray_access_denied(authctxt->user)) {
+ authenticated = 0;
+ fatal("Access denied for user %s.",authctxt->user);
+ }
+ #endif /* _CRAY */
#ifdef HAVE_CYGWIN
if (authenticated &&
diff -cr openssh/auth2.c openssh.cray/auth2.c
*** openssh/auth2.c Wed Sep 4 01:37:27 2002
--- openssh.cray/auth2.c Mon Sep 23 12:39:15 2002
***************
*** 35,40 ****
--- 35,43 ----
#include "dispatch.h"
#include "pathnames.h"
#include "monitor_wrap.h"
+ #if defined(_CRAY) && ! defined(_CRAYSV2)
+ #include <ia.h>
+ #endif /* _CRAY */
/* import */
extern ServerOptions options;
***************
*** 216,221 ****
--- 219,231 ----
authenticated = 0;
#endif /* USE_PAM */
+ #if defined(_CRAY) && !defined(_CRAYSV2)
+ if (authenticated && cray_access_denied(authctxt->user)) {
+ authenticated = 0;
+ fatal("Access denied for user %s.",authctxt->user);
+ }
+ #endif /* _CRAY */
+
/* Log before sending the reply */
auth_log(authctxt, authenticated, method, " ssh2");
***************
*** 235,240 ****
--- 245,254 ----
if (authctxt->failures++ > AUTH_FAIL_MAX) {
packet_disconnect(AUTH_FAIL_MSG, authctxt->user);
}
+ #if defined(_CRAY) && !defined(_CRAYSV2)
+ if (strcmp(method, "password") == 0)
+ cray_login_failure(authctxt->user, IA_UDBERR);
+ #endif /* _CRAY */
methods = authmethods_get();
packet_start(SSH2_MSG_USERAUTH_FAILURE);
packet_put_cstring(methods);
diff -cr openssh/deattack.c openssh.cray/deattack.c
*** openssh/deattack.c Mon Mar 4 19:53:05 2002
--- openssh.cray/deattack.c Mon Sep 23 13:34:01 2002
***************
*** 101,111 ****
--- 101,119 ----
if (h == NULL) {
debug("Installing crc compensation attack detector.");
n = l;
+ #if defined(_CRAY) && !defined(_CRAYSV2)
+ h = (u_int16_t *) xmalloc(n * sizeof(u_int16_t));
+ #else
h = (u_int16_t *) xmalloc(n * HASH_ENTRYSIZE);
+ #endif /* _CRAY */
} else {
if (l > n) {
n = l;
+ #if defined(_CRAY) && !defined(_CRAYSV2)
+ h = (u_int16_t *) xrealloc(h, n * sizeof(u_int16_t));
+ #else
h = (u_int16_t *) xrealloc(h, n * HASH_ENTRYSIZE);
+ #endif /* _CRAY */
}
}
***************
*** 128,134 ****
--- 136,146 ----
}
return (DEATTACK_OK);
}
+ #if defined(_CRAY) && !defined(_CRAYSV2)
+ for (i=0; i<n; i++) h[i] = HASH_UNUSED;
+ #else
memset(h, HASH_UNUSEDCHAR, n * HASH_ENTRYSIZE);
+ #endif /* _CRAY */
if (IV)
h[HASH(IV) & (n - 1)] = HASH_IV;
diff -cr openssh/serverloop.c openssh.cray/serverloop.c
*** openssh/serverloop.c Sat Sep 21 10:26:28 2002
--- openssh.cray/serverloop.c Mon Sep 23 13:38:52 2002
***************
*** 144,150 ****
--- 144,152 ----
int save_errno = errno;
debug("Received SIGCHLD.");
child_terminated = 1;
+ #if !defined(_CRAY) || defined(_CRAYSV2)
mysignal(SIGCHLD, sigchld_handler);
+ #endif
notify_parent();
errno = save_errno;
}
diff -cr openssh/session.c openssh.cray/session.c
*** openssh/session.c Wed Sep 18 20:50:49 2002
--- openssh.cray/session.c Mon Sep 23 12:47:35 2002
***************
*** 57,62 ****
--- 57,65 ----
#include "canohost.h"
#include "session.h"
#include "monitor_wrap.h"
+ #if defined(_CRAY) && ! defined(_CRAYSV2)
+ #include <tmpdir.h>
+ #endif
#ifdef HAVE_CYGWIN
#include <windows.h>
***************
*** 519,528 ****
--- 522,538 ----
perror("dup2 stderr");
#endif /* USE_PIPES */
+ #if defined(_CRAY) && ! defined(_CRAYSV2)
+ cray_init_job(s->pw); /* set up cray jid and tmpdir */
+ #endif
+
/* Do processing for the child (exec command etc). */
do_child(s, command);
/* NOTREACHED */
}
+ #if defined(_CRAY) && ! defined(_CRAYSV2)
+ signal(WJSIGNAL, cray_job_termination_handler);
+ #endif /* _CRAY */
#ifdef HAVE_CYGWIN
if (is_winnt)
cygwin_set_impersonation_token(INVALID_HANDLE_VALUE);
***************
*** 611,617 ****
--- 621,632 ----
/* record login, etc. similar to login(1) */
#ifndef HAVE_OSF_SIA
if (!(options.use_login && command == NULL))
+ {
+ #if defined(_CRAY) && !defined(_CRAYSV2)
+ 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);
***************
*** 622,627 ****
--- 637,645 ----
do_child(s, command);
/* NOTREACHED */
}
+ #if defined(_CRAY) && !defined(_CRAYSV2)
+ signal(WJSIGNAL, cray_job_termination_handler);
+ #endif /* _CRAY */
#ifdef HAVE_CYGWIN
if (is_winnt)
cygwin_set_impersonation_token(INVALID_HANDLE_VALUE);
***************
*** 762,767 ****
--- 780,786 ----
printf("%s\n", aixloginmsg);
#endif /* WITH_AIXAUTHENTICATE */
+ #if !defined(_CRAY) || defined(_CRAYSV2)
if (options.print_lastlog && s->last_login_time != 0) {
time_string = ctime(&s->last_login_time);
if (strchr(time_string, '\n'))
***************
*** 772,778 ****
printf("Last login: %s from %s\r\n", time_string,
s->hostname);
}
!
do_motd();
}
--- 791,797 ----
printf("Last login: %s from %s\r\n", time_string,
s->hostname);
}
! #endif /* _CRAY */
do_motd();
}
***************
*** 1031,1036 ****
--- 1050,1060 ----
child_set_env(&env, &envsize, "SSH_ORIGINAL_COMMAND",
original_command);
+ #if defined(_CRAY) && !defined(_CRAYSV2)
+ if (cray_tmpdir[0] != '\0')
+ child_set_env(&env, &envsize, "TMPDIR", cray_tmpdir);
+ #endif /* _CRAY */
+
#ifdef _AIX
{
char *cp;
***************
*** 1281,1286 ****
--- 1305,1314 ----
/* login(1) is only called if we execute the login shell */
if (options.use_login && command != NULL)
options.use_login = 0;
+
+ #if defined(_CRAY) && !defined(_CRAYSV2)
+ cray_setup(pw->pw_uid, pw->pw_name, command);
+ #endif /* _CRAY */
/*
* Login(1) does this as well, and it needs uid 0 for the "-h"
More information about the openssh-unix-dev
mailing list