Bugzilla – Attachment 134 Details for
Bug 367
patches for Cray port
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
cray patches
openssh.patch.20020722 (text/plain), 12.60 KB, created by
wendy palm
on 2002-07-23 08:38:35 AEST
(
hide
)
Description:
cray patches
Filename:
MIME Type:
Creator:
wendy palm
Created:
2002-07-23 08:38:35 AEST
Size:
12.60 KB
patch
obsolete
>diff -u openssh.snap.20020722/acconfig.h openssh.cray.20020722/acconfig.h >--- openssh.snap.20020722/acconfig.h Sun Jul 14 15:36:50 2002 >+++ openssh.cray.20020722/acconfig.h Mon Jul 22 13:01:18 2002 >@@ -150,6 +150,12 @@ > /* Define if you don't want to use lastlog */ > #undef DISABLE_LASTLOG > >+/* Define to use utmp */ >+#undef USE_UTMP >+ >+/* Define to use wtmp */ >+#undef USE_WTMP >+ > /* Define if you don't want to use utmp */ > #undef DISABLE_UTMP > >diff -u openssh.snap.20020722/auth1.c openssh.cray.20020722/auth1.c >--- openssh.snap.20020722/auth1.c Wed Jul 3 19:27:21 2002 >+++ openssh.cray.20020722/auth1.c Mon Jul 22 13:49:35 2002 >@@ -25,11 +25,19 @@ > #include "channels.h" > #include "session.h" > #include "uidswap.h" >+# if defined(_CRAY) && ! defined(_CRAYSV1) >+#include <ia.h> >+#endif /* _CRAY */ > #include "monitor_wrap.h" > > /* import */ > extern ServerOptions options; > >+# if defined(_CRAY) && ! defined(_CRAYSV1) >+extern void cray_login_failure(char *username, int errcode); >+extern int cray_access_denied(char *username); >+#endif /* _CRAY */ >+ > /* > * convert ssh auth msg type into description > */ >@@ -291,6 +299,15 @@ > if (!authctxt->valid && authenticated) > fatal("INTERNAL ERROR: authenticated invalid user %s", > authctxt->user); >+ >+# if defined(_CRAY) && ! defined(_CRAYSV1) >+ 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 -u openssh.snap.20020722/auth2.c openssh.cray.20020722/auth2.c >--- openssh.snap.20020722/auth2.c Wed Jul 3 19:27:21 2002 >+++ openssh.cray.20020722/auth2.c Mon Jul 22 13:50:30 2002 >@@ -35,12 +35,20 @@ > #include "dispatch.h" > #include "pathnames.h" > #include "monitor_wrap.h" >+#if defined(_CRAY) && !defined(_CRAYSV2) >+#include <ia.h> >+#endif /* _CRAY */ > > /* import */ > extern ServerOptions options; > extern u_char *session_id2; > extern int session_id2_len; > >+#if defined(_CRAY) && !defined(_CRAYSV2) >+extern void cray_login_failure(char *username, int errcode); >+extern int cray_access_denied(char *username); >+#endif /* _CRAY */ >+ > Authctxt *x_authctxt = NULL; > > /* methods */ >@@ -215,6 +223,13 @@ > 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"); > >@@ -234,6 +249,10 @@ > 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 -u openssh.snap.20020722/configure openssh.cray.20020722/configure >--- openssh.snap.20020722/configure Mon Jul 22 01:01:20 2002 >+++ openssh.cray.20020722/configure Mon Jul 22 13:04:23 2002 >@@ -4070,6 +4070,32 @@ > > MANTYPE=man > ;; >+*-*-unicosmk*) >+ no_libsocket=1 >+ no_libnsl=1 >+ cat >>confdefs.h <<\EOF >+#define USE_PIPES 1 >+EOF >+ >+ cat >>confdefs.h <<\EOF >+#define DISABLE_FD_PASSING 1 >+EOF >+ >+ cat >>confdefs.h <<\EOF >+#define LOGIN_NEEDS_UTMPX 1 >+EOF >+ >+ cat >>confdefs.h <<\EOF >+#define USE_UTMP 1 >+EOF >+ >+ cat >>confdefs.h <<\EOF >+#define USE_WTMP 1 >+EOF >+ LDFLAGS="$LDFLAGS" >+ LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm" >+ MANTYPE=cat >+ ;; > *-*-unicos*) > no_libsocket=1 > no_libnsl=1 >@@ -4081,8 +4107,20 @@ > #define DISABLE_FD_PASSING 1 > EOF > >- LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal,-L/usr/local/lib" >- LIBS="$LIBS -lgen -lrsc" >+ cat >>confdefs.h <<\EOF >+#define LOGIN_NEEDS_UTMPX 1 >+EOF >+ >+ cat >>confdefs.h <<\EOF >+#define USE_UTMP 1 >+EOF >+ >+ cat >>confdefs.h <<\EOF >+#define USE_WTMP 1 >+EOF >+ LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal" >+ LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm" >+ MANTYPE=cat > ;; > *-dec-osf*) > echo "$as_me:4088: checking for Digital Unix SIA" >&5 >diff -u openssh.snap.20020722/configure.ac openssh.cray.20020722/configure.ac >--- openssh.snap.20020722/configure.ac Fri Jul 19 14:41:11 2002 >+++ openssh.cray.20020722/configure.ac Mon Jul 22 13:06:25 2002 >@@ -279,13 +279,22 @@ > AC_CHECK_FUNCS(getluid setluid) > MANTYPE=man > ;; >+*-*-unicosmk*) >+ no_libsocket=1 >+ no_libnsl=1 >+ AC_DEFINE(USE_PIPES) >+ AC_DEFINE(DISABLE_FD_PASSING) >+ LDFLAGS="$LDFLAGS" >+ LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm" >+ MANTYPE=cat > *-*-unicos*) > no_libsocket=1 > no_libnsl=1 > AC_DEFINE(USE_PIPES) > AC_DEFINE(DISABLE_FD_PASSING) >- LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal,-L/usr/local/lib" >- LIBS="$LIBS -lgen -lrsc" >+ LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal" >+ LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm" >+ MANTYPE=cat > ;; > *-dec-osf*) > AC_MSG_CHECKING(for Digital Unix SIA) >Only in openssh.cray.20020722: configure.ac.rej >Only in openssh.cray.20020722: configure.rej >Common subdirectories: openssh.snap.20020722/contrib and openssh.cray.20020722/contrib >diff -u openssh.snap.20020722/deattack.c openssh.cray.20020722/deattack.c >--- openssh.snap.20020722/deattack.c Mon Mar 4 19:53:05 2002 >+++ openssh.cray.20020722/deattack.c Mon Jul 22 13:54:18 2002 >@@ -101,11 +101,19 @@ > 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,7 +136,11 @@ > } > 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 -u openssh.snap.20020722/defines.h openssh.cray.20020722/defines.h >--- openssh.snap.20020722/defines.h Thu Jul 18 11:31:52 2002 >+++ openssh.cray.20020722/defines.h Mon Jul 22 13:55:02 2002 >@@ -124,7 +124,7 @@ > # if (SIZEOF_SHORT_INT == 2) > typedef short int int16_t; > # else >-# ifdef _CRAY >+# if defined(_CRAY) && !defined(_CRAYSV2) > # if (SIZEOF_SHORT_INT == 4) > typedef short int16_t; > # else >@@ -137,7 +137,7 @@ > # if (SIZEOF_INT == 4) > typedef int int32_t; > # else >-# ifdef _CRAY >+# if defined(_CRAY) && !defined(_CRAYSV2) > typedef long int32_t; > # else > # error "32 bit int type not found." >@@ -161,7 +161,7 @@ > # if (SIZEOF_SHORT_INT == 2) > typedef unsigned short int u_int16_t; > # else >-# ifdef _CRAY >+# if defined(_CRAY) && !defined(_CRAYSV2) > # if (SIZEOF_SHORT_INT == 4) > typedef unsigned short u_int16_t; > # else >@@ -174,7 +174,7 @@ > # if (SIZEOF_INT == 4) > typedef unsigned int u_int32_t; > # else >-# ifdef _CRAY >+# if defined(_CRAY) && !defined(_CRAYSV2) > typedef unsigned long u_int32_t; > # else > # error "32 bit int type not found." >diff -u openssh.snap.20020722/loginrec.c openssh.cray.20020722/loginrec.c >--- openssh.snap.20020722/loginrec.c Sun Jul 14 17:50:51 2002 >+++ openssh.cray.20020722/loginrec.c Mon Jul 22 13:55:11 2002 >@@ -622,13 +622,13 @@ > switch (li->type) { > case LTYPE_LOGIN: > ut->ut_type = USER_PROCESS; >-#ifdef _CRAY >+#if defined(_CRAY) && !defined(_CRAYSV2) > cray_set_tmpdir(ut); > #endif > break; > case LTYPE_LOGOUT: > ut->ut_type = DEAD_PROCESS; >-#ifdef _CRAY >+#if defined(_CRAY) && !defined(_CRAYSV2) > cray_retain_utmp(ut, li->pid); > #endif > break; >diff -u openssh.snap.20020722/monitor_mm.c openssh.cray.20020722/monitor_mm.c >--- openssh.snap.20020722/monitor_mm.c Thu Jul 18 13:34:29 2002 >+++ openssh.cray.20020722/monitor_mm.c Mon Jul 22 13:34:02 2002 >@@ -28,8 +28,8 @@ > > #ifdef HAVE_SYS_MMAN_H > #include <sys/mman.h> >-void *xmmap(size_t); > #endif >+void *xmmap(size_t); > > #include "ssh.h" > #include "xmalloc.h" >Common subdirectories: openssh.snap.20020722/openbsd-compat and openssh.cray.20020722/openbsd-compat >Common subdirectories: openssh.snap.20020722/regress and openssh.cray.20020722/regress >Common subdirectories: openssh.snap.20020722/scard and openssh.cray.20020722/scard >diff -u openssh.snap.20020722/serverloop.c openssh.cray.20020722/serverloop.c >--- openssh.snap.20020722/serverloop.c Tue Jul 9 09:06:40 2002 >+++ openssh.cray.20020722/serverloop.c Mon Jul 22 13:55:35 2002 >@@ -143,7 +143,9 @@ > 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; > } >@@ -670,7 +672,11 @@ > /* We no longer want our SIGCHLD handler to be called. */ > mysignal(SIGCHLD, SIG_DFL); > >+#if defined(_CRAY) && !defined(_CRAYSV2) >+ while ((wait_pid = waitpid(-1, &wait_status, child_terminated ? WNOHANG : 0)) < 0) >+#else > while ((wait_pid = waitpid(-1, &wait_status, 0)) < 0) >+#endif /* _CRAY */ > if (errno != EINTR) > packet_disconnect("wait: %.100s", strerror(errno)); > if (wait_pid != pid) >diff -u openssh.snap.20020722/session.c openssh.cray.20020722/session.c >--- openssh.snap.20020722/session.c Mon Jul 15 12:58:35 2002 >+++ openssh.cray.20020722/session.c Mon Jul 22 13:52:55 2002 >@@ -57,6 +57,9 @@ > #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> >@@ -517,10 +520,17 @@ > 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); >@@ -608,7 +618,12 @@ > /* 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); >@@ -619,6 +634,9 @@ > 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); >@@ -759,6 +777,7 @@ > 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')) >@@ -769,6 +788,7 @@ > printf("Last login: %s from %s\r\n", time_string, > s->hostname); > } >+#endif /* ! _CRAY */ > > do_motd(); > } >@@ -1020,6 +1040,11 @@ > 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; >@@ -1259,6 +1284,10 @@ > /* 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" >diff -u openssh.snap.20020722/sshd.c openssh.cray.20020722/sshd.c >--- openssh.snap.20020722/sshd.c Sun Jul 7 15:43:36 2002 >+++ openssh.cray.20020722/sshd.c Mon Jul 22 13:51:00 2002 >@@ -934,7 +934,7 @@ > SYSLOG_FACILITY_AUTH : options.log_facility, > !inetd_flag); > >-#ifdef _CRAY >+#if defined(_CRAY) && !defined(_CRAYSV2) > /* Cray can define user privs drop all prives now! > * Not needed on PRIV_SU systems! > */ >diff -u openssh.snap.20020722/sshpty.c openssh.cray.20020722/sshpty.c >--- openssh.snap.20020722/sshpty.c Tue Jun 25 18:21:42 2002 >+++ openssh.cray.20020722/sshpty.c Mon Jul 22 13:51:20 2002 >@@ -162,7 +162,7 @@ > } > return 1; > #else /* HAVE_DEV_PTS_AND_PTC */ >-#ifdef _CRAY >+#if defined(_CRAY) && !defined(_CRAYSV2) > char buf[64]; > int i; > int highpty; >@@ -268,7 +268,7 @@ > void *old; > #endif /* USE_VHANGUP */ > >-#ifdef _CRAY >+#if defined(_CRAY) && !defined(_CRAYSV2) > if (setsid() < 0) > error("setsid: %.100s", strerror(errno)); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 367
:
134
|
135
|
136
|
149
|
150