ports/117269: [patch] security/rkhunter : udpate to 1.3.0
Philippe Audeoud
jadawin at tuxaco.net
Wed Oct 17 12:20:03 UTC 2007
>Number: 117269
>Category: ports
>Synopsis: [patch] security/rkhunter : udpate to 1.3.0
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Wed Oct 17 12:20:03 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator: Philippe Audeoud
>Release: FreeBSD 6.2-RELEASE i386
>Organization:
>Environment:
System: FreeBSD huppa.tuxaco.net 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Tue Mar 20 16:05:42 CET 2007 root@:/usr/obj/usr/src/sys/GENERIC i386
>Description:
Here a patch to update rkhunter to 1.3.0
>How-To-Repeat:
>Fix:
--- patch-rkhunter.2 begins here ---
diff -urN rkhunter.orig/Makefile rkhunter/Makefile
--- rkhunter.orig/Makefile Wed Oct 17 11:08:09 2007
+++ rkhunter/Makefile Wed Oct 17 11:44:05 2007
@@ -6,7 +6,7 @@
#
PORTNAME= rkhunter
-PORTVERSION= 1.2.9
+PORTVERSION= 1.3.0
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -40,8 +40,9 @@
.endif
do-install:
- cd ${WRKSRC} && ./installer.sh --installdir ${PREFIX}
- ${INSTALL_MAN} ${WRKSRC}/files/development/rkhunter.8 ${MAN8PREFIX}/man/man8
+ cd ${WRKSRC} && ./installer.sh --layout custom ${PREFIX} --install
+ ${INSTALL_MAN} ${WRKSRC}/files/rkhunter.8 \
+ ${MAN8PREFIX}/man/man8
@${MKDIR} ${PREFIX}/etc/periodic/security
${INSTALL_SCRIPT} ${WRKDIR}/415.rkhunter ${PREFIX}/etc/periodic/security
.if !defined(NOPORTDOCS)
diff -urN rkhunter.orig/distinfo rkhunter/distinfo
--- rkhunter.orig/distinfo Wed Oct 17 11:08:09 2007
+++ rkhunter/distinfo Wed Oct 17 11:08:47 2007
@@ -1,3 +1,3 @@
-MD5 (rkhunter-1.2.9.tar.gz) = b442c1a332746a7c40767aa587a5ca8a
-SHA256 (rkhunter-1.2.9.tar.gz) = 64d21cef13574338f49015127d369e1f02515fe4eb81cbda716d885ff4cd1278
-SIZE (rkhunter-1.2.9.tar.gz) = 147123
+MD5 (rkhunter-1.3.0.tar.gz) = 89a4628c6378fdf3331d5a43b975d967
+SHA256 (rkhunter-1.3.0.tar.gz) = a46610fc761e61f4f85750693f6e17aafa3a47e24e8cef76401f67d25e94d186
+SIZE (rkhunter-1.3.0.tar.gz) = 252011
diff -urN rkhunter.orig/files/patch-installer.sh rkhunter/files/patch-installer.sh
--- rkhunter.orig/files/patch-installer.sh Wed Oct 17 11:08:09 2007
+++ rkhunter/files/patch-installer.sh Wed Oct 17 13:42:12 2007
@@ -1,68 +1,28 @@
---- installer.sh.orig Mon Apr 25 13:24:56 2005
-+++ installer.sh Fri Apr 28 21:44:41 2006
-@@ -119,15 +119,13 @@
- overwrite:programs_good.dat:/db/programs_good.dat:Database%%Program%%versions
- overwrite:defaulthashes.dat:/db/defaulthashes.dat:Database%%Default%%file%%hashes
- overwrite:md5blacklist.dat:/db/md5blacklist.dat:Database%%MD5%%blacklisted%%files
--overwrite:CHANGELOG:/docs/CHANGELOG:Changelog
--overwrite:README:/docs/README:Readme%%and%%FAQ
--overwrite:WISHLIST:/docs/WISHLIST:Wishlist%%and%%TODO
- "
+--- installer.sh.orig Wed Oct 17 13:38:52 2007
++++ installer.sh Wed Oct 17 13:40:59 2007
+@@ -399,7 +399,7 @@
- # Prefix: INSTALLDIR
- INSTALLFILES2="
--nooverwrite:rkhunter.conf:/usr/local/etc/rkhunter.conf:RK%%Hunter%%configuration%%file
--overwrite:rkhunter:/usr/local/bin/rkhunter:RK%%Hunter%%binary
-+nooverwrite:rkhunter.conf:${INSTALLDIR}/etc/rkhunter.conf:RK%%Hunter%%configuration%%file
-+overwrite:rkhunter.conf:${INSTALLDIR}/etc/rkhunter.conf.sample:RK%%Hunter%%sample%%configuration%%file
-+overwrite:rkhunter:${INSTALLDIR}/bin/rkhunter:RK%%Hunter%%binary
- "
+ # Perl will be found in Rkhunter itself.
- # Create directories (only if they do not exist)
-@@ -136,9 +134,7 @@
- ${INSTALLDIR}/etc
- ${INSTALLDIR}/bin
- ${INSTALLDIR}/lib/rkhunter/db
--${INSTALLDIR}/lib/rkhunter/docs
- ${INSTALLDIR}/lib/rkhunter/scripts
--${INSTALLDIR}/lib/rkhunter/tmp
- /usr/local/etc
- /usr/local/bin
- "
-@@ -397,9 +393,6 @@
- #################################################################################
+-RKHINST_DIRS="$RKHINST_DOC_DIR $RKHINST_MAN_DIR $RKHINST_ETC_DIR $RKHINST_BIN_DIR"
++RKHINST_DIRS="$RKHINST_ETC_DIR $RKHINST_BIN_DIR"
+ RKHINST_DIRS_EXCEP="$RKHINST_SCRIPT_DIR $RKHINST_DB_DIR $RKHINST_TMP_DIR $RKHINST_LANG_DIR"
-
--# Clean active window
--clear
--
- echo "${INSTALLER_NAME} ${INSTALLER_VERSION} (${INSTALLER_COPYRIGHT})"
- echo $ECHOOPT "---------------"
echo "Starting installation/update"
-@@ -534,11 +527,14 @@
+@@ -526,11 +526,11 @@
done
- # Installation dir to configuration file
--INSTALLDIRCHECK=`cat /usr/local/etc/rkhunter.conf | grep "INSTALLDIR="`
-+echo "" >> ${INSTALLDIR}/etc/rkhunter.conf.sample
-+echo "INSTALLDIR=${INSTALLDIR}" >> ${INSTALLDIR}/etc/rkhunter.conf.sample
-+
-+INSTALLDIRCHECK=`cat ${INSTALLDIR}/etc/rkhunter.conf | grep "INSTALLDIR="`
- if [ "${INSTALLDIRCHECK}" = "" ]
- then
-- echo "" >> /usr/local/etc/rkhunter.conf
-- echo "INSTALLDIR=${INSTALLDIR}" >> /usr/local/etc/rkhunter.conf
-+ echo "" >> ${INSTALLDIR}/etc/rkhunter.conf
-+ echo "INSTALLDIR=${INSTALLDIR}" >> ${INSTALLDIR}/etc/rkhunter.conf
- echo "Configuration updated with installation path (${INSTALLDIR})"
- else
- echo "Configuration already updated."
-@@ -548,7 +544,7 @@
- then
- echo ""
- echo $E "$t17"
-- echo "$t18 (/usr/local/bin/rkhunter)"
-+ echo "$t18 (${INSTALLDIR}/rkhunter)"
- else
- echo ""
- echo $E "$t19"
+ # Application documents
+-for FILE in ${RKHINST_DOC_FILES}; do
+- echo $N " Installing ${FILE}: "
+- cp -f ./files/"${FILE}" "${RKHINST_DOC_DIR}"; retValChk
+- chmod "${RKHINST_MODE_RWR}" "${RKHINST_DOC_DIR}/${FILE}"
+-done
++#for FILE in ${RKHINST_DOC_FILES}; do
++# echo $N " Installing ${FILE}: "
++# cp -f ./files/"${FILE}" "${RKHINST_DOC_DIR}"; retValChk
++# chmod "${RKHINST_MODE_RWR}" "${RKHINST_DOC_DIR}/${FILE}"
++#done
+
+ # Language support files
+ echo $N " Installing language support files: "
diff -urN rkhunter.orig/files/patch-rkhunter rkhunter/files/patch-rkhunter
--- rkhunter.orig/files/patch-rkhunter Thu Jan 1 01:00:00 1970
+++ rkhunter/files/patch-rkhunter Wed Oct 17 14:06:26 2007
@@ -0,0 +1,11 @@
+--- files/rkhunter.orig Wed Oct 17 14:03:56 2007
++++ files/rkhunter Wed Oct 17 14:06:00 2007
+@@ -7959,7 +7959,7 @@
+ SOCKSTAT_CMD=`find_cmd sockstat`
+
+ if [ -n "${SOCKSTAT_CMD}" -a -n "${NETSTAT_CMD}" -a -n "${SORT_CMD}" -a -n "${UNIQ_CMD}" ]; then
+- SOCKSTAT_OUTPUT=`${SOCKSTAT_CMD} -n | grep '\*[:.]\*' | cut -c1-55 | grep '\*[:.]' | cut -c39-47 | grep -v '\*' | tr -d ' ' | ${SORT_CMD} | ${UNIQ_CMD}`
++ SOCKSTAT_OUTPUT=`${SOCKSTAT_CMD} | grep '\*[:.]\*' | cut -c1-55 | grep '\*[:.]' | cut -c39-47 | grep -v '\*' | tr -d ' ' | ${SORT_CMD} | ${UNIQ_CMD}`
+ NETSTAT_OUTPUT=`${NETSTAT_CMD} -an | egrep -v 'TIME_WAIT|ESTABLISHED|SYN_SENT|CLOSE_WAIT|LAST_ACK|SYN_RECV|CLOSING' | cut -c1-44 | grep '\*\.' | cut -c24-32 | grep -v '\*' | tr -d ' ' | tr -d '\t' | ${SORT_CMD} | ${UNIQ_CMD}`
+
+ if [ "${SOCKSTAT_OUTPUT}" = "${NETSTAT_OUTPUT}" ]; then
diff -urN rkhunter.orig/files/patch-rkhunter.conf rkhunter/files/patch-rkhunter.conf
--- rkhunter.orig/files/patch-rkhunter.conf Wed Oct 17 11:08:09 2007
+++ rkhunter/files/patch-rkhunter.conf Wed Oct 17 11:22:44 2007
@@ -1,11 +1,10 @@
---- files/rkhunter.conf.old Wed Mar 23 03:34:19 2005
-+++ files/rkhunter.conf Wed Mar 23 03:41:50 2005
-@@ -18,7 +18,7 @@
- # Note: don't use /tmp as your temporary directory, because some
- # important files will be written to this directory. Be sure
- # you have setup your permissions very tight.
--#TMPDIR=/usr/local/rkhunter/lib/rkhunter/tmp
+--- files/rkhunter.conf.orig Wed Oct 17 11:21:03 2007
++++ files/rkhunter.conf Wed Oct 17 11:21:19 2007
+@@ -76,6 +76,7 @@
+ # sure that the directory permissions are tight.
+ #
+ #TMPDIR=/var/lib/rkhunter/tmp
+TMPDIR=/root
-
- # Use a custom database directory (you can override it with the
- # --dbdir parameter)
+
+ #
+ # Specify the database directory to use.
diff -urN rkhunter.orig/pkg-plist rkhunter/pkg-plist
--- rkhunter.orig/pkg-plist Wed Oct 17 11:08:09 2007
+++ rkhunter/pkg-plist Wed Oct 17 13:42:56 2007
@@ -1,22 +1,31 @@
bin/rkhunter
- at unexec if cmp -s %D/etc/rkhunter.conf %D/etc/rkhunter.conf.sample; then rm -f %D/etc/rkhunter.conf; fi
-etc/rkhunter.conf.sample
etc/periodic/security/415.rkhunter
-lib/rkhunter/db/backdoorports.dat
-lib/rkhunter/db/defaulthashes.dat
-lib/rkhunter/db/md5blacklist.dat
-lib/rkhunter/db/mirrors.dat
-lib/rkhunter/db/os.dat
-lib/rkhunter/db/programs_bad.dat
-lib/rkhunter/db/programs_good.dat
+etc/rkhunter.conf
+var/lib/rkhunter/db/backdoorports.dat
+var/lib/rkhunter/db/defaulthashes.dat
+var/lib/rkhunter/db/md5blacklist.dat
+var/lib/rkhunter/db/mirrors.dat
+var/lib/rkhunter/db/os.dat
+var/lib/rkhunter/db/programs_bad.dat
+var/lib/rkhunter/db/suspscan.dat
+var/lib/rkhunter/db/programs_good.dat
+var/lib/rkhunter/db/i18n/cn
+var/lib/rkhunter/db/i18n/en
+var/lib/rkhunter/tmp/group
+var/lib/rkhunter/tmp/passwd
lib/rkhunter/scripts/check_modules.pl
lib/rkhunter/scripts/check_port.pl
lib/rkhunter/scripts/check_update.sh
lib/rkhunter/scripts/filehashmd5.pl
lib/rkhunter/scripts/filehashsha1.pl
lib/rkhunter/scripts/showfiles.pl
+lib/rkhunter/scripts/readlink.sh
+lib/rkhunter/scripts/stat.pl
@dirrm lib/rkhunter/scripts
- at dirrm lib/rkhunter/db
@dirrm lib/rkhunter
+ at dirrm var/lib/rkhunter/db/i18n
+ at dirrm var/lib/rkhunter/db
+ at dirrm var/lib/rkhunter/tmp
+ at dirrm var/lib/rkhunter
@dirrmtry etc/periodic/security
@dirrmtry etc/periodic
--- patch-rkhunter.2 ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list