Mercurial > dropbear
changeset 301:fb3678bdb8c7
merge of 6ace12c71fc2773210f2f3d374c96622ca54fe48
and 84eb6fedc6df0666f8053b9018bf16635dbfb257
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 25 Mar 2006 12:57:44 +0000 |
parents | 7dad470ad4aa (diff) baea1d43e7eb (current diff) |
children | 973fccb59ea4 36d21680a9d3 |
files | |
diffstat | 4 files changed, 28 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGES Sat Mar 25 12:57:37 2006 +0000 +++ b/CHANGES Sat Mar 25 12:57:44 2006 +0000 @@ -1,3 +1,7 @@ +0.48.1 - Sat 11 March 2006 + +- Compile fix for scp + 0.48 - Thurs 9 March 2006 - Check that the circular buffer is properly empty before
--- a/random.c Sat Mar 25 12:57:37 2006 +0000 +++ b/random.c Sat Mar 25 12:57:44 2006 +0000 @@ -31,7 +31,8 @@ /* this is used to generate unique output from the same hashpool */ static uint32_t counter = 0; -#define MAX_COUNTER 1<<31 /* the max value for the counter, so it won't loop */ +/* the max value for the counter, so it won't integer overflow */ +#define MAX_COUNTER 1<<30 static unsigned char hashpool[SHA1_HASH_SIZE]; @@ -167,7 +168,6 @@ gettimeofday(&tv, NULL); hash_state hs; - unsigned char hash[SHA1_HASH_SIZE]; sha1_init(&hs); sha1_process(&hs, (void*)hashpool, sizeof(hashpool)); sha1_process(&hs, (void*)&pid, sizeof(pid));
--- a/scpmisc.h Sat Mar 25 12:57:37 2006 +0000 +++ b/scpmisc.h Sat Mar 25 12:57:44 2006 +0000 @@ -46,3 +46,24 @@ char *ssh_get_progname(char *); void fatal(char* fmt,...); void sanitise_stdfd(void); + +/* Required for non-BSD platforms, from OpenSSH's defines.h */ +#ifndef timersub +#define timersub(a, b, result) \ + do { \ + (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ + (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ + if ((result)->tv_usec < 0) { \ + --(result)->tv_sec; \ + (result)->tv_usec += 1000000; \ + } \ + } while (0) +#endif + +#ifndef TIMEVAL_TO_TIMESPEC +#define TIMEVAL_TO_TIMESPEC(tv, ts) { \ + (ts)->tv_sec = (tv)->tv_sec; \ + (ts)->tv_nsec = (tv)->tv_usec * 1000; \ +} +#endif +
--- a/svr-main.c Sat Mar 25 12:57:37 2006 +0000 +++ b/svr-main.c Sat Mar 25 12:57:44 2006 +0000 @@ -28,6 +28,7 @@ #include "buffer.h" #include "signkey.h" #include "runopts.h" +#include "random.h" static size_t listensockets(int *sock, size_t sockcount, int *maxfd); static void sigchld_handler(int dummy);