# HG changeset patch # User matt-ucc@ucc.asn.au # Date 1143378331 0 # Node ID 24056a5eb75b7f7abe4094985e01e7f56da99c5d # Parent 4b4478d0d2b9d4a7d64618de94b999afb52d340c serial works better. enable DSS. diff -r 4b4478d0d2b9 -r 24056a5eb75b AXIS-README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AXIS-README Sun Mar 26 13:05:31 2006 +0000 @@ -0,0 +1,68 @@ +Running it: + +For normally (just vfork(), no inetd): + +./dropbear -F -E + +(add -v for verbose). Note that since it's vforking, only one connection +will reliably work at a time. + +For inetd-server mode, which will execv() a new dropbear inetd child each time: + +./dropbear -x /path/to/dropbear -F -E + +--------------------- + +From: Bernard Blackham +To: tech@ucc.asn.au +Subject: [tech] axis building +Date: Mon, 6 Mar 2006 20:05:15 +0800 +Message-ID: <20060306120515.GD18471@blackham.com.au> + +Notes for archiving... this is what you need to build dropbear 0.47. + +export PATH=/usr/local/cris:$PATH +export CFLAGS="-melinux -O3 -s -symbolic -D__uClinux__" + +./configure --prefix=/mnt/flash/dropbear --disable-zlib --host=cris + +make MULTI="1" STATIC="1" PROGRAMS="dropbear dbclient scp" + +cris-gcc -melinux -s -symbolic -static -o dropbearmulti dbmulti.o atomicio.o +bignum.o buffer.o circbuffer.o cli-algo.o cli-auth.o cli-authinteract.o +cli-authpasswd.o cli-authpubkey.o cli-channel.o cli-chansession.o cli-kex.o +cli-main.o cli-runopts.o cli-service.o cli-session.o cli-tcpfwd.o common-algo.o +common-channel.o common-chansession.o common-kex.o common-runopts.o +common-session.o compat.o dbutil.o dss.o fake-rfc2553.o listener.o loginrec.o +packet.o process-packet.o progressmeter.o queue.o random.o rsa.o scp.o scpmisc.o +signkey.o sshpty.o svr-agentfwd.o svr-algo.o svr-auth.o svr-authpam.o +svr-authpasswd.o svr-authpubkey.o svr-chansession.o svr-kex.o svr-main.o +svr-runopts.o svr-service.o svr-session.o svr-tcpfwd.o svr-x11fwd.o tcp-accept.o +termcodes.o libtomcrypt/libtomcrypt.a libtommath/libtommath.a -L +/usr/local/cris/lib/gcc-lib/cris/2.96/elinux/ uccrt/*.o + +[ paste the multiline cris-gcc command with `xargs` - MSH ] + +There's custom stuff in uccrt/ which should also be archived +somewhere. + +Doesn't work quite yet - needs some hacking to get around a buggy +libc. + + +------------------- + + +Or for just dropbear without multi: + +make STATIC=1 + +cris-gcc -o dropbear dbutil.o buffer.o dss.o bignum.o signkey.o rsa.o +random.o queue.o atomicio.o compat.o fake-rfc2553.o common-session.o packet.o +common-algo.o common-kex.o common-channel.o common-chansession.o termcodes.o +loginrec.o tcp-accept.o listener.o process-packet.o common-runopts.o +circbuffer.o svr-kex.o svr-algo.o svr-auth.o sshpty.o svr-authpasswd.o +svr-authpubkey.o svr-session.o svr-service.o svr-chansession.o svr-runopts.o +svr-agentfwd.o svr-main.o svr-x11fwd.o svr-tcpfwd.o svr-authpam.o +libtomcrypt/libtomcrypt.a libtommath/libtommath.a -melinux -s -symbolic +-static -L /usr/local/cris/lib/gcc-lib/cris/2.96/elinux/ uccrt/*.o diff -r 4b4478d0d2b9 -r 24056a5eb75b README.axis --- a/README.axis Sun Mar 26 08:28:16 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -Running it: - -For normally (just vfork(), no inetd): - -./dropbear -F -E - -(add -v for verbose). Note that since it's vforking, only one connection -will reliably work at a time. - -For inetd-server mode, which will execv() a new dropbear inetd child each time: - -./dropbear -x /path/to/dropbear -F -E - ---------------------- - -From: Bernard Blackham -To: tech@ucc.asn.au -Subject: [tech] axis building -Date: Mon, 6 Mar 2006 20:05:15 +0800 -Message-ID: <20060306120515.GD18471@blackham.com.au> - -Notes for archiving... this is what you need to build dropbear 0.47. - -export PATH=/usr/local/cris:$PATH -export CFLAGS="-melinux -O3 -s -symbolic -D__uClinux__" - -./configure --prefix=/mnt/flash/dropbear --disable-zlib --host=cris - -make MULTI="1" STATIC="1" PROGRAMS="dropbear dbclient scp" - -cris-gcc -melinux -s -symbolic -static -o dropbearmulti dbmulti.o atomicio.o -bignum.o buffer.o circbuffer.o cli-algo.o cli-auth.o cli-authinteract.o -cli-authpasswd.o cli-authpubkey.o cli-channel.o cli-chansession.o cli-kex.o -cli-main.o cli-runopts.o cli-service.o cli-session.o cli-tcpfwd.o common-algo.o -common-channel.o common-chansession.o common-kex.o common-runopts.o -common-session.o compat.o dbutil.o dss.o fake-rfc2553.o listener.o loginrec.o -packet.o process-packet.o progressmeter.o queue.o random.o rsa.o scp.o scpmisc.o -signkey.o sshpty.o svr-agentfwd.o svr-algo.o svr-auth.o svr-authpam.o -svr-authpasswd.o svr-authpubkey.o svr-chansession.o svr-kex.o svr-main.o -svr-runopts.o svr-service.o svr-session.o svr-tcpfwd.o svr-x11fwd.o tcp-accept.o -termcodes.o libtomcrypt/libtomcrypt.a libtommath/libtommath.a -L -/usr/local/cris/lib/gcc-lib/cris/2.96/elinux/ uccrt/*.o - -[ paste the multiline cris-gcc command with `xargs` - MSH ] - -There's custom stuff in uccrt/ which should also be archived -somewhere. - -Doesn't work quite yet - needs some hacking to get around a buggy -libc. - - -------------------- - - -Or for just dropbear without multi: - -make STATIC=1 - -cris-gcc -o dropbear dbutil.o buffer.o dss.o bignum.o signkey.o rsa.o -random.o queue.o atomicio.o compat.o fake-rfc2553.o common-session.o packet.o -common-algo.o common-kex.o common-channel.o common-chansession.o termcodes.o -loginrec.o tcp-accept.o listener.o process-packet.o common-runopts.o -circbuffer.o svr-kex.o svr-algo.o svr-auth.o sshpty.o svr-authpasswd.o -svr-authpubkey.o svr-session.o svr-service.o svr-chansession.o svr-runopts.o -svr-agentfwd.o svr-main.o svr-x11fwd.o svr-tcpfwd.o svr-authpam.o -libtomcrypt/libtomcrypt.a libtommath/libtommath.a -melinux -s -symbolic --static -L /usr/local/cris/lib/gcc-lib/cris/2.96/elinux/ uccrt/*.o diff -r 4b4478d0d2b9 -r 24056a5eb75b options.h --- a/options.h Sun Mar 26 08:28:16 2006 +0000 +++ b/options.h Sun Mar 26 13:05:31 2006 +0000 @@ -100,7 +100,7 @@ * Removing either of these won't save very much space. * SSH2 RFC Draft requires dss, recommends rsa */ #define DROPBEAR_RSA -//#define DROPBEAR_DSS +#define DROPBEAR_DSS /* RSA can be vulnerable to timing attacks which use the time required for * signing to guess the private key. Blinding avoids this attack, though makes diff -r 4b4478d0d2b9 -r 24056a5eb75b svr-chansession.c --- a/svr-chansession.c Sun Mar 26 08:28:16 2006 +0000 +++ b/svr-chansession.c Sun Mar 26 13:05:31 2006 +0000 @@ -647,6 +647,7 @@ static void serial_connect(struct Channel *channel) { int serial_fd; + struct termios options; TRACE(("enter serial_connect")) @@ -659,7 +660,24 @@ } TRACE(("success serial_connect")) - /* XXX TODO - code to set the serial fd to the right baud/settings etc */ + + /* set some serial options. XXX needs attention */ + tcgetattr(serial_fd, &options); + + cfsetispeed(&options, B9600); + cfsetospeed(&options, B9600); + + options.c_cflag &= ~CSIZE; /* Mask the character size bits */ + options.c_cflag |= CS8; /* Select 8 data bits */ + options.c_cflag &= ~PARENB; + options.c_cflag &= ~CSTOPB; + options.c_cflag &= ~CSIZE; + + options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); + options.c_iflag |= (INPCK | ISTRIP); + + tcsetattr(serial_fd, TCSANOW, &options); + ses.maxfd = MAX(serial_fd, channel->writefd); setnonblocking(serial_fd);