NetBSD Problem Report #25701
Received: (qmail 28977 invoked by uid 605); 25 May 2004 10:15:37 -0000
Message-Id: <200405251015.i4PAFYit024641@harry.ki.nu>
Date: Tue, 25 May 2004 19:15:34 +0900 (JST)
From: makoto@ki.nu
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: makoto@ki.nu
To: gnats-bugs@gnats.netbsd.org
Subject: security/chkrootkit
X-Send-Pr-Version: 3.95
>Number: 25701
>Category: pkg
>Synopsis: patch for NetBSD required on chklastlog
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue May 25 10:16:00 +0000 2004
>Closed-Date: Wed May 26 15:08:48 +0000 2004
>Last-Modified: Wed May 26 15:08:48 +0000 2004
>Originator: Makoto Fujiwara
>Release: NetBSD 1.6ZG
>Organization:
KINU Corporation
>Environment:
System: NetBSD harry 1.6ZG NetBSD 1.6ZG (INSECURE-ZS-L2PB2-SHM) #0: Mon Dec 22 12:51:00 JST 2003 makoto@quick.ki.nu:/e2/20031206/sys/arch/macppc/compile/INSECURE-ZS-L2PB2-SHM macppc
Architecture: powerpc
Machine: macppc
>Description:
when chklastlog of chkrootkit invoked, we got following message
-------------
> chklastlog
unable to open lastlog-file /var/adm/lastlog
-------------
>How-To-Repeat:
cd security/chkrootkit
make install
rehash
chklastlog
>Fix:
This should be raised to upstream, but interim patch is here
Index: distinfo
===================================================================
RCS file: /e/celeron/CVSup/main/pkgsrc/security/chkrootkit/distinfo,v
retrieving revision 1.1.1.1
diff -u -a -r1.1.1.1 distinfo
--- distinfo 17 Feb 2004 15:33:52 -0000 1.1.1.1
+++ distinfo 25 May 2004 10:07:03 -0000
@@ -3,3 +3,4 @@
SHA1 (chkrootkit-0.43/chkrootkit.tar.gz) = 58e3693823a9b8ab9b6bb609d54b5716af332a00
Size (chkrootkit-0.43/chkrootkit.tar.gz) = 33355 bytes
SHA1 (patch-aa) = c47ecb09d02c710727420a3adfb7d8b62d721f2d
+SHA1 (patch-ab) = 0712a97401414857380fc2b0105dbd13694a772a
--- /dev/null Tue May 25 18:50:47 2004
+++ patches/patch-ab Tue May 25 19:06:47 2004
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- chklastlog.c~ Sat Dec 27 03:30:12 2003
++++ chklastlog.c Tue May 25 18:48:48 2004
+@@ -57,6 +57,10 @@
+ #define WTMP_FILENAME "/var/log/wtmp"
+ #define LASTLOG_FILENAME "/var/log/lastlog"
+ #endif
++#ifdef __NetBSD__
++#define WTMP_FILENAME "/var/log/wtmp"
++#define LASTLOG_FILENAME "/var/log/lastlog"
++#endif
+ #ifdef __OpenBSD__
+ #define WTMP_FILENAME "/var/log/wtmp"
+ #define LASTLOG_FILENAME "/var/log/lastlog"
>Release-Note:
>Audit-Trail:
From: Michal Pasternak <michal@pasternak.w.lub.pl>
To: makoto@ki.nu
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/25701: security/chkrootkit
Date: Tue, 25 May 2004 13:36:39 +0200
makoto@ki.nu [Tue, May 25, 2004 at 07:15:34PM +0900]:
> + #endif
> ++#ifdef __NetBSD__
> ++#define WTMP_FILENAME "/var/log/wtmp"
> ++#define LASTLOG_FILENAME "/var/log/lastlog"
> ++#endif
> + #ifdef __OpenBSD__
I'd do this other way. Your method is good, but it will work only on NetBSD.
As pkgsrc must be as portable, as possible, I'd:
* add -DWTMP_FILENAME="..." and -DLASTLOG_FILENAME="..." to *pkg* makefile
* perform OS-dependent wtmp and lastlog setting in pkgsrc
* perhaps it should be even worth adding definitions for those filenames
to toplevel defaults.mk files and make them overrideable by the admin.
--
m
From: Thomas Klausner <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: pr/25701 CVS commit: pkgsrc/security/chkrootkit
Date: Wed, 26 May 2004 15:04:32 +0000 (UTC)
Module Name: pkgsrc
Committed By: wiz
Date: Wed May 26 15:04:32 UTC 2004
Modified Files:
pkgsrc/security/chkrootkit: Makefile distinfo
Added Files:
pkgsrc/security/chkrootkit/patches: patch-ab
Log Message:
Make chklastlog useful on NetBSD; from Makoto Fujiwara in PR 25701.
Bump PKGREVISION.
To generate a diff of this commit:
cvs rdiff -r1.3 -r1.4 pkgsrc/security/chkrootkit/Makefile
cvs rdiff -r1.1.1.1 -r1.2 pkgsrc/security/chkrootkit/distinfo
cvs rdiff -r0 -r1.1 pkgsrc/security/chkrootkit/patches/patch-ab
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: wiz
State-Changed-When: Wed May 26 15:08:37 UTC 2004
State-Changed-Why:
Added to pkgsrc, and fed back to the authors. Thanks!
>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.