changeset 305:1876c6bb084b ucc-axis-hack

A few changes for the 0.48 merge
author matt-ucc@ucc.asn.au
date Sat, 25 Mar 2006 17:10:27 +0000
parents 1f36a94e01b9
children 5d5bbca82aba
files README.axis cli-chansession.c random.c
diffstat 3 files changed, 29 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/README.axis	Sat Mar 25 16:26:29 2006 +0000
+++ b/README.axis	Sat Mar 25 17:10:27 2006 +0000
@@ -34,3 +34,20 @@
 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
--- a/cli-chansession.c	Sat Mar 25 16:26:29 2006 +0000
+++ b/cli-chansession.c	Sat Mar 25 17:10:27 2006 +0000
@@ -168,9 +168,9 @@
 	unsigned int value;
 	unsigned int mapcode;
 
-	TRACE(("enter put_termcodes"))
+	unsigned int bufpos1, bufpos2;
 
-	unsigned int bufpos1, bufpos2;
+	TRACE(("enter put_termcodes"))
 
 	if (tcgetattr(STDIN_FILENO, &tio) == -1) {
 		dropbear_log(LOG_WARNING, "Failed reading termmodes");
--- a/random.c	Sat Mar 25 16:26:29 2006 +0000
+++ b/random.c	Sat Mar 25 17:10:27 2006 +0000
@@ -36,7 +36,8 @@
 
 static unsigned char hashpool[SHA1_HASH_SIZE];
 
-#define INIT_SEED_SIZE 32 /* 256 bits */
+/* 256 bits */
+#define INIT_SEED_SIZE 32
 
 static void readrand(unsigned char* buf, unsigned int buflen);
 
@@ -129,12 +130,11 @@
 /* initialise the prng from /dev/(u)random or prngd */
 void seedrandom() {
 		
+	hash_state hs;
 	unsigned char readbuf[INIT_SEED_SIZE];
 
-	hash_state hs;
-
 	/* initialise so that things won't warn about
-     * hashing an undefined buffer */
+	 * hashing an undefined buffer */
 	if (!donerandinit) {
 		m_burn(hashpool, sizeof(hashpool));
 	}
@@ -157,17 +157,17 @@
  * the random pools for fork()ed processes. */
 void reseedrandom() {
 
-    pid_t pid;
-    struct timeval tv;
+	pid_t pid;
+	hash_state hs;
+	struct timeval tv;
 
 	if (!donerandinit) {
 		dropbear_exit("seedrandom not done");
 	}
 
-    pid = getpid();
-    gettimeofday(&tv, NULL);
+	pid = getpid();
+	gettimeofday(&tv, NULL);
 
-	hash_state hs;
 	sha1_init(&hs);
 	sha1_process(&hs, (void*)hashpool, sizeof(hashpool));
 	sha1_process(&hs, (void*)&pid, sizeof(pid));
@@ -233,7 +233,7 @@
 		bytes_to_mp(rand, randbuf, len);
 
 		/* keep regenerating until we get one satisfying
-		 * 0 < rand < max    */
+		 * 0 < rand < max	 */
 	} while ( ( (max != NULL) && (mp_cmp(rand, max) != MP_LT) )
 			|| (mp_cmp_d(rand, 0) != MP_GT) );
 	m_burn(randbuf, len);