blob: 92cfe1b843ab8b9d7142a7089e179513924f5a39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
$NetBSD: patch-ab,v 1.11 2003/09/23 13:58:37 wiz Exp $
--- main.c.orig Sat Apr 6 05:26:01 2002
+++ main.c Tue Sep 23 10:53:01 2003
@@ -46,7 +46,14 @@
#include <stdio.h>
#include <errno.h>
#include <pwd.h>
+#ifdef __NetBSD__
+#include <sys/sysctl.h>
+#endif
+#ifndef KI_MAXCOMLEN /* Pre NetBSD/1.5. Missing on !NetBSD */
+#define KI_MAXCOMLEN 24
+#endif
+
/*
* Processes which could not be checked -- usually due to permission
* problems (SunOS 4.1, SysVR4) -- are tallied in "MissedProcCnt".
@@ -137,7 +144,7 @@
for (i = 0; i < CmdIndx; i++) {
cmdp = (CmdList + i);
if ((cmdp->flags & CMD_FLAG_EXACT) != 0 &&
- STREQU(CMD, cmdp->cmd.cmdstr))
+ STRNEQU(CMD, cmdp->cmd.cmdstr, KI_MAXCOMLEN-8))
break;
else if ((cmdp->flags & CMD_FLAG_REGEX) != 0 &&
RegexMatch(CMD, cmdp) != 0)
|