Index: head/security/rkhunter/Makefile =================================================================== --- head/security/rkhunter/Makefile (revision 443546) +++ head/security/rkhunter/Makefile (revision 443547) @@ -1,52 +1,52 @@ # Created by: Radim Kolar # $FreeBSD$ PORTNAME= rkhunter PORTVERSION= 1.4.2 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= security MASTER_SITES= SF MAINTAINER= lukasz@wasikowski.net COMMENT= Rootkit detection tool LICENSE= GPLv2 OPTIONS_DEFINE= LSOF NMAP DOCS OPTIONS_DEFAULT=LSOF -RUN_DEPENDS+= p5-Digest-SHA1>=0:security/p5-Digest-SHA1 \ - ${LOCALBASE}/bin/wget:ftp/wget +RUN_DEPENDS+= p5-Digest-SHA1>=0:security/p5-Digest-SHA1 USES= perl5 shebangfix SHEBANG_FILES= files/check_modules.pl files/filehashsha.pl \ files/stat.pl +NO_ARCH= yes NO_BUILD= yes SUB_FILES= 415.${PORTNAME} PORTDOCS= ACKNOWLEDGMENTS CHANGELOG FAQ LICENSE README LSOF_RUN_DEPENDS= lsof:sysutils/lsof NMAP_RUN_DEPENDS= nmap:security/nmap post-patch: @${REINPLACE_CMD} -i '' -e 's|{SHAREDIR}/man/man8|{PREFIX}/man/man8|g' \ ${WRKSRC}/installer.sh @${REINPLACE_CMD} -i '' -e 's|RKHPREFIX|${PREFIX}|g' \ ${WRKSRC}/files/${PORTNAME}.conf do-install: cd ${WRKSRC} && ./installer.sh --layout custom ${STAGEDIR}${PREFIX} --install ${INSTALL_MAN} ${WRKSRC}/files/${PORTNAME}.8 \ ${STAGEDIR}${MAN8PREFIX}/man/man8 @${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/security ${INSTALL_SCRIPT} ${WRKDIR}/415.${PORTNAME} ${STAGEDIR}${PREFIX}/etc/periodic/security @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/files/|} ${STAGEDIR}${DOCSDIR} @${REINPLACE_CMD} -i '' -e 's|${STAGEDIR}||g' \ ${STAGEDIR}${PREFIX}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf ${INSTALL_DATA} ${WRKSRC}/files/${PORTNAME}.conf ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample ${INSTALL_DATA} -m 640 ${WRKSRC}/files/programs_bad.dat ${STAGEDIR}${PREFIX}/var/lib/${PORTNAME}/db/programs_bad.dat.sample ${INSTALL_DATA} -m 640 ${WRKSRC}/files/mirrors.dat ${STAGEDIR}${PREFIX}/var/lib/${PORTNAME}/db/mirrors.dat.sample .include Index: head/security/rkhunter/files/patch-files__rkhunter.conf =================================================================== --- head/security/rkhunter/files/patch-files__rkhunter.conf (revision 443546) +++ head/security/rkhunter/files/patch-files__rkhunter.conf (nonexistent) @@ -1,82 +0,0 @@ ---- files/rkhunter.conf.orig 2014-01-25 22:29:51.000000000 +0100 -+++ files/rkhunter.conf 2014-08-11 23:18:14.887973000 +0200 -@@ -154,7 +154,7 @@ - # subsequently commented out or removed, then the program will assume a - # default directory beneath the installation directory. - # --#TMPDIR=/var/lib/rkhunter/tmp -+TMPDIR=RKHPREFIX/var/lib/rkhunter/tmp - - # - # This option specifies the database directory to use. -@@ -163,7 +163,7 @@ - # subsequently commented out or removed, then the program will assume a - # default directory beneath the installation directory. - # --#DBDIR=/var/lib/rkhunter/db -+DBDIR=RKHPREFIX/var/lib/rkhunter/db - - # - # This option specifies the script directory to use. -@@ -171,7 +171,7 @@ - # The installer program will set the default directory. If this default is - # subsequently commented out or removed, then the program will not run. - # --#SCRIPTDIR=/usr/local/lib/rkhunter/scripts -+SCRIPTDIR=RKHPREFIX/lib/rkhunter/scripts - - # - # This option can be used to modify the command directory list used by rkhunter -@@ -303,7 +303,7 @@ - # - # The default value is 'no'. - # --#ALLOW_SSH_ROOT_USER=no -+ALLOW_SSH_ROOT_USER=unset - - # - # Set this option to '1' to allow the use of the SSH-1 protocol, but note -@@ -317,7 +317,7 @@ - # - # The default value is '0'. - # --#ALLOW_SSH_PROT_V1=0 -+ALLOW_SSH_PROT_V1=2 - - # - # This setting tells rkhunter the directory containing the SSH configuration -@@ -575,6 +575,8 @@ - # The default value is the null string. - # - #SCRIPTWHITELIST=/usr/bin/groups -+SCRIPTWHITELIST=/usr/bin/whatis -+SCRIPTWHITELIST=/usr/sbin/adduser - - # - # Allow the specified file to have the immutable attribute set. -@@ -584,6 +586,10 @@ - # The default value is the null string. - # - #IMMUTWHITELIST=/sbin/ifdown -+IMMUTWHITELIST=/usr/bin/login -+IMMUTWHITELIST=/usr/bin/passwd -+IMMUTWHITELIST=/usr/bin/su -+IMMUTWHITELIST=/sbin/init - - # - # If this option is set to '1', then the immutable-bit test is reversed. That -@@ -787,6 +793,7 @@ - # The default value is the null string. - # - #UID0_ACCOUNTS=toor rooty -+UID0_ACCOUNTS=toor - - # - # This option allows the specified accounts to have no password. NIS/YP entries -@@ -1222,3 +1229,6 @@ - # - #EMPTY_LOGFILES="" - #MISSING_LOGFILES="" -+ -+INSTALLDIR=RKHPREFIX -+USER_FILEPROP_FILES_DIRS=RKHPREFIX/etc/rkhunter.conf Property changes on: head/security/rkhunter/files/patch-files__rkhunter.conf ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/security/rkhunter/files/patch-files_rkhunter =================================================================== --- head/security/rkhunter/files/patch-files_rkhunter (nonexistent) +++ head/security/rkhunter/files/patch-files_rkhunter (revision 443547) @@ -0,0 +1,21 @@ +--- files/rkhunter.orig 2014-03-12 20:54:55 UTC ++++ files/rkhunter +@@ -7275,6 +7275,9 @@ download_file() { + rm -f "${OUTPUT_FILE}" >/dev/null 2>&1 + + case "${RKHWEBCMD_BASE}" in ++ fetch) ++ CMD="${RKHWEBCMD} ${RKHWEBCMD_OPTS} -q -o \"${OUTPUT_FILE}\" ${MIRROR}${URL} 2>/dev/null" ++ ;; + wget) + CMD="${RKHWEBCMD} ${RKHWEBCMD_OPTS} -q -O \"${OUTPUT_FILE}\" ${MIRROR}${URL} 2>/dev/null" + ;; +@@ -18557,7 +18560,7 @@ REQCMDS="awk cat chmod chown cp cut date egrep grep he + # List of commands used to download files from the web. This list is + # used by the '--update' and '--versioncheck' options. Preferred commands + # are listed first. This can be overridden by the config file. +-WEBCMDLIST="wget curl elinks links lynx bget GET" ++WEBCMDLIST="fetch wget curl elinks links lynx bget GET" + + RKHWEBCMD="" + RKHWEBCMD_OPTS="" Property changes on: head/security/rkhunter/files/patch-files_rkhunter ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/security/rkhunter/files/patch-files_rkhunter.conf =================================================================== --- head/security/rkhunter/files/patch-files_rkhunter.conf (nonexistent) +++ head/security/rkhunter/files/patch-files_rkhunter.conf (revision 443547) @@ -0,0 +1,82 @@ +--- files/rkhunter.conf.orig 2014-01-25 21:29:51 UTC ++++ files/rkhunter.conf +@@ -154,7 +154,7 @@ + # subsequently commented out or removed, then the program will assume a + # default directory beneath the installation directory. + # +-#TMPDIR=/var/lib/rkhunter/tmp ++TMPDIR=RKHPREFIX/var/lib/rkhunter/tmp + + # + # This option specifies the database directory to use. +@@ -163,7 +163,7 @@ + # subsequently commented out or removed, then the program will assume a + # default directory beneath the installation directory. + # +-#DBDIR=/var/lib/rkhunter/db ++DBDIR=RKHPREFIX/var/lib/rkhunter/db + + # + # This option specifies the script directory to use. +@@ -171,7 +171,7 @@ + # The installer program will set the default directory. If this default is + # subsequently commented out or removed, then the program will not run. + # +-#SCRIPTDIR=/usr/local/lib/rkhunter/scripts ++SCRIPTDIR=RKHPREFIX/lib/rkhunter/scripts + + # + # This option can be used to modify the command directory list used by rkhunter +@@ -303,7 +303,7 @@ AUTO_X_DETECT=1 + # + # The default value is 'no'. + # +-#ALLOW_SSH_ROOT_USER=no ++ALLOW_SSH_ROOT_USER=unset + + # + # Set this option to '1' to allow the use of the SSH-1 protocol, but note +@@ -317,7 +317,7 @@ AUTO_X_DETECT=1 + # + # The default value is '0'. + # +-#ALLOW_SSH_PROT_V1=0 ++ALLOW_SSH_PROT_V1=2 + + # + # This setting tells rkhunter the directory containing the SSH configuration +@@ -575,6 +575,8 @@ DISABLE_TESTS=suspscan hidden_ports hidden_procs delet + # The default value is the null string. + # + #SCRIPTWHITELIST=/usr/bin/groups ++SCRIPTWHITELIST=/usr/bin/whatis ++SCRIPTWHITELIST=/usr/sbin/adduser + + # + # Allow the specified file to have the immutable attribute set. +@@ -584,6 +586,10 @@ DISABLE_TESTS=suspscan hidden_ports hidden_procs delet + # The default value is the null string. + # + #IMMUTWHITELIST=/sbin/ifdown ++IMMUTWHITELIST=/usr/bin/login ++IMMUTWHITELIST=/usr/bin/passwd ++IMMUTWHITELIST=/usr/bin/su ++IMMUTWHITELIST=/sbin/init + + # + # If this option is set to '1', then the immutable-bit test is reversed. That +@@ -787,6 +793,7 @@ DISABLE_TESTS=suspscan hidden_ports hidden_procs delet + # The default value is the null string. + # + #UID0_ACCOUNTS=toor rooty ++UID0_ACCOUNTS=toor + + # + # This option allows the specified accounts to have no password. NIS/YP entries +@@ -1222,3 +1229,6 @@ DISABLE_TESTS=suspscan hidden_ports hidden_procs delet + # + #EMPTY_LOGFILES="" + #MISSING_LOGFILES="" ++ ++INSTALLDIR=RKHPREFIX ++USER_FILEPROP_FILES_DIRS=RKHPREFIX/etc/rkhunter.conf Property changes on: head/security/rkhunter/files/patch-files_rkhunter.conf ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/security/rkhunter/files/patch-installer.sh =================================================================== --- head/security/rkhunter/files/patch-installer.sh (revision 443546) +++ head/security/rkhunter/files/patch-installer.sh (revision 443547) @@ -1,49 +1,49 @@ ---- ./installer.sh.orig 2012-04-27 00:10:12.000000000 +0200 -+++ ./installer.sh 2012-07-03 23:56:30.000000000 +0200 -@@ -392,7 +392,7 @@ +--- installer.sh.orig 2014-02-24 02:37:15 UTC ++++ installer.sh +@@ -392,7 +392,7 @@ selectTemplate() { # Take input from the "--install pa RKHINST_ETC_DIR="${SYSCONFIGDIR}" RKHINST_BIN_DIR="${BINDIR}" RKHINST_SCRIPT_DIR="${LIBDIR}/${APPNAME}/scripts" - RKHINST_MAN_DIR="${SHAREDIR}/man/man8" + RKHINST_MAN_DIR="${PREFIX}/man/man8" if [ "${RKHINST_LAYOUT}" = "oldschool" ]; then RKHINST_DB_DIR="${VARDIR}/${APPNAME}/db" -@@ -406,12 +406,12 @@ +@@ -406,12 +406,12 @@ selectTemplate() { # Take input from the "--install pa elif [ "${RKHINST_LAYOUT}" = "TXZ" ]; then RKHINST_DB_DIR="${VARDIR}/lib/${APPNAME}/db" RKHINST_TMP_DIR="${VARDIR}/lib/${APPNAME}/tmp" - RKHINST_DOC_DIR="${PREFIX}/doc/${APPNAME}-${APPVERSION}" + RKHINST_DOC_DIR="${PREFIX}/doc/${APPNAME}" RKHINST_MAN_DIR="${PREFIX}/man/man8" else RKHINST_DB_DIR="${VARDIR}/lib/${APPNAME}/db" RKHINST_TMP_DIR="${VARDIR}/lib/${APPNAME}/tmp" - RKHINST_DOC_DIR="${SHAREDIR}/doc/${APPNAME}-${APPVERSION}" + RKHINST_DOC_DIR="${SHAREDIR}/doc/${APPNAME}" fi RKHINST_LANG_DIR="${RKHINST_DB_DIR}/i18n" -@@ -1076,22 +1076,6 @@ +@@ -1099,22 +1099,6 @@ doRemove() { + fi fi done - - +- - # Application - for FILE in ${RKHINST_BIN_FILES}; do - if [ -f "${RKHINST_BIN_DIR}/${FILE}" ]; then - rm -f "${RKHINST_BIN_DIR}/${FILE}" >/dev/null 2>&1 - ERRCODE=$? - - if [ $ERRCODE -eq 0 ]; then - echo " Removing ${RKHINST_BIN_DIR}/${FILE}: OK" - else - echo " Removing ${RKHINST_BIN_DIR}/${FILE}: FAILED: Code $ERRCODE" - fi - fi - done - -- + # Configuration file for FILE in ${RKHINST_ETC_FILE}; do - if [ -f "${RKHINST_ETC_DIR}/${FILE}" ]; then Index: head/security/rkhunter/pkg-plist =================================================================== --- head/security/rkhunter/pkg-plist (revision 443546) +++ head/security/rkhunter/pkg-plist (revision 443547) @@ -1,43 +1,43 @@ bin/rkhunter etc/periodic/security/415.rkhunter @sample etc/rkhunter.conf.sample lib/rkhunter/scripts/check_modules.pl lib/rkhunter/scripts/filehashsha.pl lib/rkhunter/scripts/readlink.sh lib/rkhunter/scripts/stat.pl man/man8/rkhunter.8.gz var/lib/rkhunter/db/backdoorports.dat var/lib/rkhunter/db/i18n/cn var/lib/rkhunter/db/i18n/de var/lib/rkhunter/db/i18n/en var/lib/rkhunter/db/i18n/tr var/lib/rkhunter/db/i18n/tr.utf8 var/lib/rkhunter/db/i18n/zh var/lib/rkhunter/db/i18n/zh.utf8 @sample var/lib/rkhunter/db/mirrors.dat.sample @sample var/lib/rkhunter/db/programs_bad.dat.sample var/lib/rkhunter/db/signatures/RKH_Glubteba.ldb var/lib/rkhunter/db/signatures/RKH_dso.ldb var/lib/rkhunter/db/signatures/RKH_jynx.ldb var/lib/rkhunter/db/signatures/RKH_kbeast.ldb var/lib/rkhunter/db/signatures/RKH_libkeyutils.ldb var/lib/rkhunter/db/signatures/RKH_libkeyutils1.ldb var/lib/rkhunter/db/signatures/RKH_libncom.ldb var/lib/rkhunter/db/signatures/RKH_pamunixtrojan.ldb var/lib/rkhunter/db/signatures/RKH_shv.ldb var/lib/rkhunter/db/signatures/RKH_sniffer.ldb var/lib/rkhunter/db/signatures/RKH_sshd.ldb var/lib/rkhunter/db/signatures/RKH_turtle.ldb var/lib/rkhunter/db/signatures/RKH_xsyslog.ldb var/lib/rkhunter/db/suspscan.dat -@unexec rm -f %D/var/lib/rkhunter/db/rkhunter_prop_list.dat 2> /dev/null || true -@unexec rm -f %D/var/lib/rkhunter/db/rkhunter.dat* 2> /dev/null || true +@postunexec rm -f %D/var/lib/rkhunter/db/rkhunter_prop_list.dat 2> /dev/null || true +@postunexec rm -f %D/var/lib/rkhunter/db/rkhunter.dat* 2> /dev/null || true var/lib/rkhunter/tmp/group var/lib/rkhunter/tmp/passwd @dir(,,0750) lib/rkhunter/scripts @dir(,,0750) lib/rkhunter @dir(,,0750) var/lib/rkhunter/db/i18n @dir(,,0750) var/lib/rkhunter/db/signatures @dir(,,0750) var/lib/rkhunter/db @dir(,,0750) var/lib/rkhunter/tmp @dir(,,0750) var/lib/rkhunter