pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/chkrootkit - fix false positive for netstat



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5c68435f2bd3
branches:  trunk
changeset: 650971:5c68435f2bd3
user:      christos <christos%pkgsrc.org@localhost>
date:      Wed Apr 29 15:55:47 2015 +0000

description:
- fix false positive for netstat
- fix compilation mistake

diffstat:

 security/chkrootkit/Makefile         |   3 ++-
 security/chkrootkit/distinfo         |   6 +++---
 security/chkrootkit/patches/patch-ab |  20 +++++++++++++++-----
 security/chkrootkit/patches/patch-ad |  20 +++++++++++++++++++-
 4 files changed, 39 insertions(+), 10 deletions(-)

diffs (89 lines):

diff -r 20c7b36ff06e -r 5c68435f2bd3 security/chkrootkit/Makefile
--- a/security/chkrootkit/Makefile      Wed Apr 29 15:55:46 2015 +0000
+++ b/security/chkrootkit/Makefile      Wed Apr 29 15:55:47 2015 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.23 2014/12/08 14:04:57 mef Exp $
+# $NetBSD: Makefile,v 1.24 2015/04/29 15:55:47 christos Exp $
 #
 
 DISTNAME=              chkrootkit-0.50
+PKGREVISION=           1
 CATEGORIES=            security
 MASTER_SITES=          ftp://ftp.pangeia.com.br/pub/seg/pac/
 
diff -r 20c7b36ff06e -r 5c68435f2bd3 security/chkrootkit/distinfo
--- a/security/chkrootkit/distinfo      Wed Apr 29 15:55:46 2015 +0000
+++ b/security/chkrootkit/distinfo      Wed Apr 29 15:55:47 2015 +0000
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.11 2014/12/08 14:04:57 mef Exp $
+$NetBSD: distinfo,v 1.12 2015/04/29 15:55:47 christos Exp $
 
 SHA1 (chkrootkit-0.50.tar.gz) = 0c3f40b2919d25421a90533c2fe6cca81321232c
 RMD160 (chkrootkit-0.50.tar.gz) = c038cc6ddbc0cf30d3492545bc02b1c95df973f1
 Size (chkrootkit-0.50.tar.gz) = 38616 bytes
 SHA1 (patch-aa) = e047b8f102125c8bf3452943b90a72164ce6b1e1
-SHA1 (patch-ab) = 695de249986090b6e23b5a649d6d0116c360e74d
+SHA1 (patch-ab) = 248f8bdd9dae2a8f81574346da32971600d8f4e4
 SHA1 (patch-ac) = fb0561e916d8b61e19636e301554c221adf115da
-SHA1 (patch-ad) = 0fe07cdf00ac6e9d9c6366f74c4e009f858688e4
+SHA1 (patch-ad) = a24ebbbc726856cc1f6594d0e4c68afac6b77fc1
diff -r 20c7b36ff06e -r 5c68435f2bd3 security/chkrootkit/patches/patch-ab
--- a/security/chkrootkit/patches/patch-ab      Wed Apr 29 15:55:46 2015 +0000
+++ b/security/chkrootkit/patches/patch-ab      Wed Apr 29 15:55:47 2015 +0000
@@ -1,10 +1,20 @@
-$NetBSD: patch-ab,v 1.2 2014/12/08 14:04:57 mef Exp $
+$NetBSD: patch-ab,v 1.3 2015/04/29 15:55:47 christos Exp $
 
-Add NetBSD Path
+Add NetBSD Path, and include stdlib.h for everyone (malloc)
 
---- chklastlog.c.orig  2014-05-06 19:12:14.000000000 +0900
-+++ chklastlog.c       2014-12-08 22:32:03.000000000 +0900
-@@ -59,6 +59,10 @@
+--- chklastlog.c.orig  2014-05-06 06:12:14.000000000 -0400
++++ chklastlog.c       2015-04-29 10:23:02.000000000 -0400
+@@ -37,9 +37,7 @@
+ int main () { return 0; }
+ #else
+ #include <stdio.h>
+-#ifdef __linux__
+ #include <stdlib.h>
+-#endif
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <string.h>
+@@ -59,6 +57,10 @@
  #define WTMP_FILENAME "/var/log/wtmp"
  #define LASTLOG_FILENAME "/var/log/lastlog"
  #endif
diff -r 20c7b36ff06e -r 5c68435f2bd3 security/chkrootkit/patches/patch-ad
--- a/security/chkrootkit/patches/patch-ad      Wed Apr 29 15:55:46 2015 +0000
+++ b/security/chkrootkit/patches/patch-ad      Wed Apr 29 15:55:47 2015 +0000
@@ -1,4 +1,7 @@
-$NetBSD: patch-ad,v 1.2 2013/06/16 10:11:58 shattered Exp $
+$NetBSD: patch-ad,v 1.3 2015/04/29 15:55:47 christos Exp $
+
+- Add NetBSD to the list of OS's
+- Handle a false positive for NetBSD's netstat
 
 --- chkrootkit.orig    2009-07-30 14:10:54.000000000 +0000
 +++ chkrootkit
@@ -20,3 +23,18 @@
        files=""
        if [ "${QUIET}" != "t" ];then printn "Searching for OBSD rk v1... "; fi
        files=`${find} ${ROOTDIR}usr/lib/security 2>/dev/null`
+@@ -1599,7 +1599,13 @@
+ 
+ chk_netstat () {
+     STATUS=${NOT_INFECTED}
+-NETSTAT_I_L="/dev/hdl0/dev/xdta|/dev/ttyoa|/dev/pty[pqrsx]|/dev/cui|/dev/hdn0|/dev/cui221|/dev/dszy|/dev/ddth3|/dev/caca|^/prof|/dev/tux|grep|addr\.h|__bzero"
++NETSTAT_I_L="/dev/hdl0/dev/xdta|/dev/ttyoa|/dev/pty[pqrsx]|/dev/cui|/dev/hdn0|/dev/cui221|/dev/dszy|/dev/ddth3|/dev/caca|^/prof|/dev/tux|addr\.h|__bzero"
++
++    case "${SYSTEM}"  in
++    NetBSD)   ;;      # NetBSD contains "mobile_regreply"
++    *)        NETSTAT_I_L="${NETSTAT_I_L}|grep";;
++    esac
++
+     CMD=`loc netstat netstat $pth`
+ 
+     if [ "${EXPERT}" = "t" ]; then



Home | Main Index | Thread Index | Old Index