[packages/rkhunter] - rel 2; from FC (fix for newer grep and locale)

arekm arekm at pld-linux.org
Mon Feb 8 07:18:41 CET 2016


commit 14b1dd380a93412111e24d102b0c8b72ca12f434
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Feb 8 07:18:36 2016 +0100

    - rel 2; from FC (fix for newer grep and locale)

 rkhunter-1.4.2-grepopt.patch     | 11 +++++++++++
 rkhunter-1.4.2-ipcs-locale.patch | 18 ++++++++++++++++++
 rkhunter.spec                    |  6 +++++-
 3 files changed, 34 insertions(+), 1 deletion(-)
---
diff --git a/rkhunter.spec b/rkhunter.spec
index 67db7dd..acc1181 100644
--- a/rkhunter.spec
+++ b/rkhunter.spec
@@ -2,13 +2,15 @@ Summary:	Rootkit Hunter
 Summary(pl.UTF-8):	Program do poszukiwania rootkitów
 Name:		rkhunter
 Version:	1.4.2
-Release:	1
+Release:	2
 License:	GPL
 Group:		Applications
 Source0:	http://downloads.sourceforge.net/rkhunter/%{name}-%{version}.tar.gz
 # Source0-md5:	85ad366b7f3999eb2a9371e39a1a4df7
 Source1:	%{name}.cron
 Source2:	%{name}.conf
+Patch0:		rkhunter-1.4.2-grepopt.patch
+Patch1:		rkhunter-1.4.2-ipcs-locale.patch
 URL:		http://www.rootkit.nl/projects/rootkit_hunter.html
 Requires:	binutils
 Requires:	coreutils
@@ -49,6 +51,8 @@ wszystkich.
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
 
 %install
 rm -rf $RPM_BUILD_ROOT
diff --git a/rkhunter-1.4.2-grepopt.patch b/rkhunter-1.4.2-grepopt.patch
new file mode 100644
index 0000000..6f1f6fb
--- /dev/null
+++ b/rkhunter-1.4.2-grepopt.patch
@@ -0,0 +1,11 @@
+diff -Nur rkhunter-1.4.2.orig/files/rkhunter rkhunter-1.4.2/files/rkhunter
+--- rkhunter-1.4.2.orig/files/rkhunter	2014-12-20 09:07:54.826773450 -0700
++++ rkhunter-1.4.2/files/rkhunter	2014-12-20 09:08:45.739800180 -0700
+@@ -18480,6 +18480,7 @@
+ case "${OPERATING_SYSTEM}" in
+ Linux)
+ 	LINUXOS=1
++	GREP_OPT="-a"
+ 	;;
+ *BSD|DragonFly)
+ 	BSDOS=1
diff --git a/rkhunter-1.4.2-ipcs-locale.patch b/rkhunter-1.4.2-ipcs-locale.patch
new file mode 100644
index 0000000..0457e4c
--- /dev/null
+++ b/rkhunter-1.4.2-ipcs-locale.patch
@@ -0,0 +1,18 @@
+diff -Nur rkhunter-1.4.2.orig/files/rkhunter rkhunter-1.4.2/files/rkhunter
+--- rkhunter-1.4.2.orig/files/rkhunter	2014-03-12 14:54:55.000000000 -0600
++++ rkhunter-1.4.2/files/rkhunter	2014-04-06 11:39:44.776583858 -0600
+@@ -13964,11 +13964,11 @@
+                         touch "${IPCS_TMPFILE}"
+                         FOUND=0; echo $FOUND > "${IPCS_TMPFILE}"
+ 
+-                        if [ `${IPCS_CMD} -u 2>/dev/null | awk -F' ' '/segments allocated/ {print $3}'` -ne 0 ]; then
+-                                ${IPCS_CMD} -m | grep "^0x" | while read RKH_SHM_KEY RKH_SHM_SHMID RKH_SHM_OWNER RKH_SHM_PERMS RKH_SHM_BYTES RKH_SHM_NATTACH RKH_SHM_STATUS; do
++                        if [ `LC_ALL=C ${IPCS_CMD} -u 2>/dev/null | awk -F' ' '/segments allocated/ {print $3}'` -ne 0 ]; then
++                                LC_ALL=C ${IPCS_CMD} -m | grep "^0x" | while read RKH_SHM_KEY RKH_SHM_SHMID RKH_SHM_OWNER RKH_SHM_PERMS RKH_SHM_BYTES RKH_SHM_NATTACH RKH_SHM_STATUS; do
+                                         if [ $RKH_SHM_PERMS -eq 666 -a $RKH_SHM_BYTES -ge 1000000 ]; then
+                                                 FOUND=1; echo $FOUND > "${IPCS_TMPFILE}"
+-                                                ${IPCS_CMD} -p | grep "^${RKH_SHM_SHMID}" | while read RKH_SHM_SHMID RKH_SHM_OWNER RKH_SHM_CPID RKH_SHM_LPID; do
++                                                LC_ALL=C ${IPCS_CMD} -p | grep "^${RKH_SHM_SHMID}" | while read RKH_SHM_SHMID RKH_SHM_OWNER RKH_SHM_CPID RKH_SHM_LPID; do
+                                                         RKH_SHM_PATH=`${READLINK_CMD} -f /proc/${RKH_SHM_CPID}/exe`
+                                                         if [ $VERBOSE_LOGGING -eq 1 ]; then
+                                                                 display --to LOG --type PLAIN --result FOUND --log-indent 2 ROOTKIT_MALWARE_IPCS_DETAILS "${RKH_SHM_PATH}" "${RKH_SHM_CPID}" "${RKH_SHM_OWNER}"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rkhunter.git/commitdiff/14b1dd380a93412111e24d102b0c8b72ca12f434



More information about the pld-cvs-commit mailing list