NetBSD Problem Report #247
From gnats Mon May 9 09:57:15 1994
Received: from gandalf.bbb.no (root@gandalf.bbb.no [192.124.156.194]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id JAA13775 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Mon, 9 May 1994 09:56:59 -0700
Message-Id: <199405091656.SAA01073@gandalf.bbb.no>
Date: Mon, 9 May 1994 18:56:53 +0200
From: Thorsten Lockert <tholo@SigmaSoft.COM>
Reply-To: tholo@SigmaSoft.COM
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: rwhod doesn't properly truncate it's files
X-Send-Pr-Version: 3.2
>Number: 247
>Category: bin
>Synopsis: rwhod doesn't properly truncate it's files
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: gnats-admin
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon May 09 10:05:01 +0000 1994
>Closed-Date: Wed Jun 08 12:37:02 +0000 1994
>Last-Modified:
>Originator: Thorsten Lockert
>Release:
>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 |
>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
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback
State-Changed-By: jtc
State-Changed-When: Sat May 28 19:53:41 1994
State-Changed-Why:
The submitter's change couldn't be applied since the kvm library has been
changed. I integrated 4.4lite's rwhod instead.
State-Changed-From-To: feedback->closed
State-Changed-By: jtc
State-Changed-When: Wed Jun 8 12:37:02 1994
State-Changed-Why:
The submitter got back to me and says the fix works.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.