This patch fixes my botched attempted to patch deattack.c. I created a bsd-cray.h file and cleaned up a few error cases in bsd-cray.c. Fixed cray_setup call to pass uid and login name in session.c and moved its call so that its called with root privs. Its been tested on a irix, sun, aix, unicos(SV1) and unicosmk(T3E) systems. If you are building this on a T3E you may have to edit the Makefile and edit out "-lrpc -lyp -lrpc". There a patch for sco that incorrectly assume that you have a yp library if you have a rpc library. I will submit a generic fix to this list latter since it is generic problem. I decided to go into a little more detail about the patches to each module: channels.c - Use a new subroutine from packet.c to get a singed integer. The original bsd code use the fact that you can set a 32bit unsigned int to a 32 bit signed variable and recover the sign bit. CRAY ints are 64 bit so the trick can't work. configure.in - Add OSSH_PATH_ENTROPY_PROG(PROG_SAR, sar). I missed this in the last patch. It is need for the sar entry in ssh_prng_cmds.in deattack.c - Modified to not depend on u_int16_t being 16bit in size. packet.c - Add new subroutine to return an explicit signed integer. scp.c - Modified to use alarm instead of setitimer. Unicos does not support setitier. serverloop.c - Modified sigchld_handler to only reset SIGCLD if HAVE_SIGACTION is not set. This is the only case its needs to be reset, the side effect is it fixes the problem with a infinite signal loop under unicos and unicosmk. Modified waitpid to keep trying if it gets an EINTR, this can happen due to job termination signal on unicos and unicosmk. session.c - Added unicos/unicosmk job termination signal handler. Add TMPDIR envireent variable. Add code to set up a unicos/unicosmk job and system limits. sshpty.c - Unicos/unicosk pty support. In openbsd-compat directory: bindresvport.c & - Code around the fact that the address of sin_port rresvport.c. really is 64 bit aligned on a SV1. bsd-cray.c - New - cray support routines. bsd-cray.h - Cray support. -------------- next part -------------- A non-text attachment was scrubbed... Name: craypatch-20010725 Type: application/octet-stream Size: 15439 bytes Desc: not available Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20010726/f819450f/attachment.obj
This patch fixes my botched attempted to patch deattack.c. I created a bsd-cray.h file and cleaned up a few error cases in bsd-cray.c. Fixed cray_setup call to pass uid and login name in session.c and moved its call so that its called with root privs. Its been tested on a irix, sun, aix, unicos(SV1) and unicosmk(T3E) systems. If you are building this on a T3E you may have to edit the Makefile and edit out "-lrpc -lyp -lrpc". There a patch for sco that incorrectly assume that you have a yp library if you have a rpc library. I will submit a generic fix to this list latter since it is generic problem. I decided to go into a little more detail about the patches to each module: channels.c - Use a new subroutine from packet.c to get a singed integer. The original bsd code use the fact that you can set a 32bit unsigned int to a 32 bit signed variable and recover the sign bit. CRAY ints are 64 bit so the trick can't work. configure.in - Add OSSH_PATH_ENTROPY_PROG(PROG_SAR, sar). I missed this in the last patch. It is need for the sar entry in ssh_prng_cmds.in deattack.c - Modified to not depend on u_int16_t being 16bit in size. packet.c - Add new subroutine to return an explicit signed integer. scp.c - Modified to use alarm instead of setitimer. Unicos does not support setitier. serverloop.c - Modified sigchld_handler to only reset SIGCLD if HAVE_SIGACTION is not set. This is the only case its needs to be reset, the side effect is it fixes the problem with a infinite signal loop under unicos and unicosmk. Modified waitpid to keep trying if it gets an EINTR, this can happen due to job termination signal on unicos and unicosmk. session.c - Added unicos/unicosmk job termination signal handler. Add TMPDIR envireent variable. Add code to set up a unicos/unicosmk job and system limits. sshpty.c - Unicos/unicosk pty support. In openbsd-compat directory: bindresvport.c & - Code around the fact that the address of sin_port rresvport.c. really is 64 bit aligned on a SV1. bsd-cray.c - New - cray support routines. bsd-cray.h - Cray support. -------------- next part -------------- A non-text attachment was scrubbed... Name: craypatch-20010725 Type: application/octet-stream Size: 15439 bytes Desc: not available Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20010726/0065684f/attachment.obj
This patch fixes my botched attempted to patch deattack.c. I created a bsd-cray.h file and cleaned up a few error cases in bsd-cray.c. Fixed cray_setup call to pass uid and login name in session.c and moved its call so that its called with root privs. Its been tested on a irix, sun, aix, unicos(SV1) and unicosmk(T3E) systems. If you are building this on a T3E you may have to edit the Makefile and edit out "-lrpc -lyp -lrpc". There a patch for sco that incorrectly assume that you have a yp library if you have a rpc library. I will submit a generic fix to this list latter since it is generic problem. I decided to go into a little more detail about the patches to each module: channels.c - Use a new subroutine from packet.c to get a singed integer. The original bsd code use the fact that you can set a 32bit unsigned int to a 32 bit signed variable and recover the sign bit. CRAY ints are 64 bit so the trick can't work. configure.in - Add OSSH_PATH_ENTROPY_PROG(PROG_SAR, sar). I missed this in the last patch. It is need for the sar entry in ssh_prng_cmds.in deattack.c - Modified to not depend on u_int16_t being 16bit in size. packet.c - Add new subroutine to return an explicit signed integer. scp.c - Modified to use alarm instead of setitimer. Unicos does not support setitier. serverloop.c - Modified sigchld_handler to only reset SIGCLD if HAVE_SIGACTION is not set. This is the only case its needs to be reset, the side effect is it fixes the problem with a infinite signal loop under unicos and unicosmk. Modified waitpid to keep trying if it gets an EINTR, this can happen due to job termination signal on unicos and unicosmk. session.c - Added unicos/unicosmk job termination signal handler. Add TMPDIR envireent variable. Add code to set up a unicos/unicosmk job and system limits. sshpty.c - Unicos/unicosk pty support. In openbsd-compat directory: bindresvport.c & - Code around the fact that the address of sin_port rresvport.c. really is 64 bit aligned on a SV1. bsd-cray.c - New - cray support routines. bsd-cray.h - Cray support. -------------- next part -------------- A non-text attachment was scrubbed... Name: craypatch-20010725 Type: application/octet-stream Size: 15439 bytes Desc: not available Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20010726/6fa60188/attachment.obj
This patch fixes my botched attempted to patch deattack.c. I created a bsd-cray.h file and cleaned up a few error cases in bsd-cray.c. Fixed cray_setup call to pass uid and login name in session.c and moved its call so that its called with root privs. Its been tested on a irix, sun, aix, unicos(SV1) and unicosmk(T3E) systems. If you are building this on a T3E you may have to edit the Makefile and edit out "-lrpc -lyp -lrpc". There a patch for sco that incorrectly assume that you have a yp library if you have a rpc library. I will submit a generic fix to this list latter since it is generic problem. I decided to go into a little more detail about the patches to each module: channels.c - Use a new subroutine from packet.c to get a singed integer. The original bsd code use the fact that you can set a 32bit unsigned int to a 32 bit signed variable and recover the sign bit. CRAY ints are 64 bit so the trick can't work. configure.in - Add OSSH_PATH_ENTROPY_PROG(PROG_SAR, sar). I missed this in the last patch. It is need for the sar entry in ssh_prng_cmds.in deattack.c - Modified to not depend on u_int16_t being 16bit in size. packet.c - Add new subroutine to return an explicit signed integer. scp.c - Modified to use alarm instead of setitimer. Unicos does not support setitier. serverloop.c - Modified sigchld_handler to only reset SIGCLD if HAVE_SIGACTION is not set. This is the only case its needs to be reset, the side effect is it fixes the problem with a infinite signal loop under unicos and unicosmk. Modified waitpid to keep trying if it gets an EINTR, this can happen due to job termination signal on unicos and unicosmk. session.c - Added unicos/unicosmk job termination signal handler. Add TMPDIR envireent variable. Add code to set up a unicos/unicosmk job and system limits. sshpty.c - Unicos/unicosk pty support. In openbsd-compat directory: bindresvport.c & - Code around the fact that the address of sin_port rresvport.c. really is 64 bit aligned on a SV1. bsd-cray.c - New - cray support routines. -------------- next part -------------- A non-text attachment was scrubbed... Name: craypatch-20010725 Type: application/octet-stream Size: 15439 bytes Desc: not available Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20010726/bb6bcce9/attachment.obj
This patch fixes my botched attempted to patch deattack.c. I created a bsd-cray.h file and cleaned up a few error cases in bsd-cray.c. Fixed cray_setup call to pass uid and login name in session.c and moved its call so that its called with root privs. Its been tested on a irix, sun, aix, unicos(SV1) and unicosmk(T3E) systems. If you are building this on a T3E you may have to edit the Makefile and edit out "-lrpc -lyp -lrpc". There a patch for sco that incorrectly assume that you have a yp library if you have a rpc library. I will submit a generic fix to this list latter since it is generic problem. I decided to go into a little more detail about the patches to each module: channels.c - Use a new subroutine from packet.c to get a singed integer. The original bsd code use the fact that you can set a 32bit unsigned int to a 32 bit signed variable and recover the sign bit. CRAY ints are 64 bit so the trick can't work. configure.in - Add OSSH_PATH_ENTROPY_PROG(PROG_SAR, sar). I missed this in the last patch. It is need for the sar entry in ssh_prng_cmds.in deattack.c - Modified to not depend on u_int16_t being 16bit in size. packet.c - Add new subroutine to return an explicit signed integer. scp.c - Modified to use alarm instead of setitimer. Unicos does not support setitier. serverloop.c - Modified sigchld_handler to only reset SIGCLD if HAVE_SIGACTION is not set. This is the only case its needs to be reset, the side effect is it fixes the problem with a infinite signal loop under unicos and unicosmk. Modified waitpid to keep trying if it gets an EINTR, this can happen due to job termination signal on unicos and unicosmk. session.c - Added unicos/unicosmk job termination signal handler. Add TMPDIR envireent variable. Add code to set up a unicos/unicosmk job and system limits. sshpty.c - Unicos/unicosk pty support. In openbsd-compat directory: bindresvport.c & - Code around the fact that the address of sin_port rresvport.c. really is 64 bit aligned on a SV1. bsd-cray.c - New - cray support routines. -------------- next part -------------- A non-text attachment was scrubbed... Name: craypatch-20010725 Type: application/octet-stream Size: 15439 bytes Desc: not available Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20010726/14d5bb9e/attachment.obj
mouring at etoh.eviladmin.org
2001-Jul-26 15:16 UTC
Updated Cray patch against openssh SNAP-20010725
> I decided to go into a little more detail about the patches to > each module: >[..]> serverloop.c - Modified sigchld_handler to only reset > SIGCLD if HAVE_SIGACTION is not set. This is the > only case its needs to be reset, the side effect > is it fixes the problem with a infinite signal loop > under unicos and unicosmk.Hmm.. I suggest if you want to keep doing this to do #if !defined(HAVE_SIGACTION) && defined(_CRAY) because this could be valid on other platforms. mysignal drops back to signal() if sigaction() can not be found (most notiable NeXTStep).
On Thu, Jul 26, 2001 at 08:45:02AM -0500, William L. Jones wrote:> packet.c - Add new subroutine to return an explicit signed > integer.i don't think you need this. an unsigned int should be ok in all cases.
"William L. Jones" wrote: ...> If you are building this on a T3E you may have to edit the Makefile > and edit out "-lrpc -lyp -lrpc". There a patch for sco that > incorrectly assume that you have a yp library if you > have a rpc library. I will submit a generic fix to this list > latter since it is generic problem.if you are building this (or other open source) package on a cray, this is a perpetual problem. most configure scripts figure out the existence of a library by creating a small program and compiling it with the library, then checking the exit status to determine if the loader found the library. the default exit status on unicos machines is "0" for a library not found message. to overcome this, add -Wl,"-Dmsglevel=334:fatal" to your loader flags. % diff -u configure.in.orig configure.in --- configure.in.orig Wed Aug 1 16:24:39 2001 +++ configure.in Wed Aug 1 16:26:43 2001 @@ -247,6 +247,7 @@ AC_DEFINE(USE_PIPES) LDFLAGS="$LDFLAGS -L/usr/local/lib" LIBS="$LIBS -lgen -lrsc" + LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal" ;; *-dec-osf*) AC_MSG_CHECKING(for Digital Unix SIA) -- wendy palm Cray OS Sustaining Engineering, Cray Inc. wendyp at cray.com, 651-605-9154