aboutsummaryrefslogtreecommitdiff
path: root/security/chkrootkit
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2003-09-04 13:03:05 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2003-09-04 13:03:05 +0000
commit3b9cc111da444078830155c56db7415f5aac7b67 (patch)
tree226f2d7559e316a55f67337b4cdb7561ae256476 /security/chkrootkit
parent8639e04dd9d661eec564a76ec151640686ef8693 (diff)
downloadports-3b9cc111da444078830155c56db7415f5aac7b67.tar.gz
ports-3b9cc111da444078830155c56db7415f5aac7b67.zip
Notes
Diffstat (limited to 'security/chkrootkit')
-rw-r--r--security/chkrootkit/Makefile4
-rw-r--r--security/chkrootkit/files/patch-chkrootkit84
2 files changed, 84 insertions, 4 deletions
diff --git a/security/chkrootkit/Makefile b/security/chkrootkit/Makefile
index f58f906cc250..5772d0a95ad7 100644
--- a/security/chkrootkit/Makefile
+++ b/security/chkrootkit/Makefile
@@ -23,10 +23,6 @@ BINMODE= 0700
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 500000
-IGNORE= "Reports false positives on 5.x"
-.endif
-
pre-patch:
${REINPLACE_CMD} -e "s/^CC/#CC/; s/^CFLAGS/#CFLAGS/" ${WRKSRC}/Makefile
${REINPLACE_CMD} -e \
diff --git a/security/chkrootkit/files/patch-chkrootkit b/security/chkrootkit/files/patch-chkrootkit
new file mode 100644
index 000000000000..684a30e781a2
--- /dev/null
+++ b/security/chkrootkit/files/patch-chkrootkit
@@ -0,0 +1,84 @@
+--- chkrootkit.orig Sun Aug 24 12:04:58 2003
++++ chkrootkit Sun Aug 24 12:08:26 2003
+@@ -1020,8 +1020,10 @@
+ STATUS=${INFECTED}
+ fi;;
+ FreeBSD)
++ TMP="2"
++ if [ "${FreeBSD5}" = "yes" ]; then TMP="1"; fi
+ if [ `${strings} -a ${CMD} | \
+- ${egrep} -c "${GENERIC_ROOTKIT_LABEL}"` -ne 2 ]
++ ${egrep} -c "${GENERIC_ROOTKIT_LABEL}"` -ne "${TMP}" ]
+ then
+ STATUS=${INFECTED}
+ fi;;
+@@ -1053,7 +1055,9 @@
+ fi
+ fi;;
+ FreeBSD)
+- if [ `${strings} -a ${CMD} | ${egrep} -c "${GENERIC_ROOTKIT_LABEL}"` -ne 2 ]
++ TMP="2"
++ if [ "${FreeBSD5}" = "yes" ] ; then TMP="1"; fi
++ if [ `${strings} -a ${CMD} | ${egrep} -c "${GENERIC_ROOTKIT_LABEL}"` -ne "${TMP}" ]
+ then
+ STATUS=${INFECTED}
+ fi;;
+@@ -1264,7 +1268,10 @@
+ return 5
+ fi
+
+- if ${strings} -a ${CMD} | ${egrep} "${LS_INFECTED_LABEL}" >/dev/null 2>&1
++ TMP="0"
++ if [ "${FreeBSD5}" = "yes" ] ; then TMP="1"; fi
++ if [ `${strings} -a ${CMD} | \
++ ${egrep} -c "${LS_INFECTED_LABEL}"` -ne "${TMP}" ]
+ then
+ STATUS=${INFECTED}
+ fi
+@@ -1342,7 +1349,10 @@
+ return 5
+ fi
+
+- if ${strings} -a ${CMD} | ${egrep} "${PS_I_L}" >/dev/null 2>&1
++ TMP="0"
++ if [ "${FreeBSD5}" = "yes" ] ; then TMP="1"; fi
++ if [ `${strings} -a ${CMD} | \
++ ${egrep} -c "${PS_I_L}"` -ne "${TMP}" ]
+ then
+ STATUS=${INFECTED}
+ fi
+@@ -1560,7 +1570,10 @@
+ return 5
+ fi
+
+- if ${strings} -a ${CMD} | ${egrep} "${GENERIC_ROOTKIT_LABEL}" > /dev/null 2>&1
++ TMP="0"
++ if [ "${FreeBSD5}" = "yes" ] ; then TMP="2"; fi
++ if [ `${strings} -a ${CMD} | \
++ ${egrep} -c "${GENERIC_ROOTKIT_LABEL}"` -ne "${TMP}" ]
+ then
+ STATUS=${INFECTED}
+ fi
+@@ -1750,7 +1763,7 @@
+ STATUS=${NOT_INFECTED}
+ CMD=`loc vdir vdir $pth`
+ VDIR_INFECTED_LABEL="/lib/volc"
+- if [ -r ${CMD} ]; then
++ if [ ! -r ${CMD} ]; then
+ return ${NOT_FOUND}
+ fi
+
+@@ -2323,6 +2336,13 @@
+
+ SYSTEM=`${uname} -s`
+ VERSION=`${uname} -r`
++
++if [ "${SYSTEM}" = "FreeBSD" ] ; then
++ if [ -n '`uname -r | grep "^5"`' ] ; then
++ FreeBSD5="yes"
++ fi
++fi
++
+ if [ "${SYSTEM}" != "FreeBSD" -a ${SYSTEM} != "OpenBSD" ] ; then
+ V=44
+ else