Subject: bin/247: rwhod doesn't properly truncate it's files
To: None <gnats-admin>
From: Thorsten Lockert <tholo@SigmaSoft.COM>
List: netbsd-bugs
Date: 05/09/1994 10:05:02
>Number:         247
>Category:       bin
>Synopsis:       rwhod doesn't properly truncate it's files
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    gnats-admin (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May  9 10:05:01 1994
>Originator:     Thorsten Lockert
>Organization:
Thorsten Lockert  | postmaster@bbb.no   |
Postbox 435       | hostmaster@bbb.no   |  Universe, n.:
N-5001 Bergen     | tholo@bbb.no        |          The problem.
Norway            | tholo@sigmasoft.com |
>Release:        
>Environment:
	
System: NetBSD gandalf.bbb.no 0.9B GANDALF#0 i386


>Description:
	rwhod.c doesn't bring needed prototypes into scope,
	so ftruncate() will not get correct values on the stack
>How-To-Repeat:
	Don't!
>Fix:
--- rwhod.c.orig        Wed Apr  6 12:24:06 1994
+++ rwhod.c     Mon May  9 18:53:13 1994
@@ -53,6 +53,7 @@
 #include <netinet/in.h>
 
 #include <nlist.h>
+#include <kvm.h>
 #include <errno.h>
 #include <utmp.h>
 #include <ctype.h>
@@ -60,7 +61,10 @@
 #include <syslog.h>
 #include <protocols/rwhod.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <strings.h>
 #include <paths.h>
+#include <unistd.h>
 
 /*
  * Alarm interval. Don't forget to change the down time check in ruptime
>Audit-Trail:
>Unformatted:


------------------------------------------------------------------------------