Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Nov 2006 00:53:59 -0800 (PST)
From:      "Eric P. Scott" <eps+pbug0611@ana.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/105994: security/dropbear: fix compilation problems
Message-ID:  <200611290853.kAT8rxtl017902@anna.ana.com>
Resent-Message-ID: <200611290850.kAT8oCi0002298@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         105994
>Category:       ports
>Synopsis:       security/dropbear: fix compilation problems
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 29 08:50:11 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Eric P. Scott
>Release:        FreeBSD 4.11-SECURITY i386
>Organization:
ana-systems, Inc.
>Environment:
System: FreeBSD fourever 4.11-SECURITY FreeBSD 4.11-SECURITY #0: Tue Feb 28 16:06:29 GMT 2006 root@builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386
>Description:
dropbear-0.48.1 fails to build on FreeBSD 4.x;
Two files in upstream source contain misordered statements
>How-To-Repeat:
See http://pointyhat.freebsd.org/errorlogs/
>Fix:
1. Add as files/patch-includes.h
-------
--- includes.h.orig	Sat Mar 11 20:52:51 2006
+++ includes.h
@@ -72,11 +72,11 @@
 #include <lastlog.h>
 #endif
 
-#include <arpa/inet.h>
-
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
+
+#include <arpa/inet.h>
 
 /* netbsd 1.6 needs this to be included before netinet/ip.h for some
  * undocumented reason */
-------

2. Add as files/patch-random.c
-------
--- random.c.orig	Sat Mar 11 20:52:51 2006
+++ random.c
@@ -158,6 +158,8 @@
 
     pid_t pid;
     struct timeval tv;
+	hash_state hs;
+	unsigned char hash[SHA1_HASH_SIZE];
 
 	if (!donerandinit) {
 		dropbear_exit("seedrandom not done");
@@ -166,8 +168,6 @@
     pid = getpid();
     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));
-------
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611290853.kAT8rxtl017902>