From c855298df5f7907c8d9da5d4fe701df80095cdbf Mon Sep 17 00:00:00 2001 From: tiwek Date: Wed, 23 Feb 2005 16:06:39 +0000 Subject: [PATCH] - up to 0.45 Changed files: chkrootkit-names.patch -> 1.13 chkrootkit-nostrip.patch -> 1.4 chkrootkit-utmpx.patch -> 1.1 chkrootkit.spec -> 1.42 --- chkrootkit-names.patch | 48 ++++++++++++++++++++++++++-------------- chkrootkit-nostrip.patch | 16 +++++++++----- chkrootkit-utmpx.patch | 11 +++++++++ chkrootkit.spec | 12 +++++----- 4 files changed, 58 insertions(+), 29 deletions(-) create mode 100644 chkrootkit-utmpx.patch diff --git a/chkrootkit-names.patch b/chkrootkit-names.patch index 9fc0590..4df1330 100644 --- a/chkrootkit-names.patch +++ b/chkrootkit-names.patch @@ -1,7 +1,6 @@ -diff -Nur chkrootkit-0.44.orig/chkrootkit chkrootkit-0.44/chkrootkit ---- chkrootkit-0.44.orig/chkrootkit 2004-09-01 13:27:28.000000000 +0000 -+++ chkrootkit-0.44/chkrootkit 2004-09-01 16:50:34.000000000 +0000 -@@ -149,20 +149,20 @@ +--- chkrootkit-0.45/chkrootkit~ 2005-02-22 13:57:31.000000000 +0100 ++++ chkrootkit-0.45/chkrootkit 2005-02-23 16:06:28.882194672 +0100 +@@ -149,23 +149,23 @@ fi if [ "${EXPERT}" = "t" ]; then @@ -20,6 +19,21 @@ diff -Nur chkrootkit-0.44.orig/chkrootkit chkrootkit-0.44/chkrootkit fi } + chkutmp() { +- if [ ! -x ./chkutmp ]; then +- echo "not tested: can't exec ./chkutmp" ++ if [ ! -x /usr/bin/chkrootkit-chkutmp ]; then ++ echo "not tested: can't exec /usr/bin/chkrootkit-chkutmp" + return ${NOT_TESTED} + fi +- if ./chkutmp ++ if /usr/bin/chkrootkit-chkutmp + then + if [ "${QUIET}" != "t" ]; then echo "chkutmp: nothing deleted"; fi + fi +@@ -173,8 +173,8 @@ + } + z2 () { - if [ ! -x ./chklastlog ]; then - echo "not tested: can't exec ./chklastlog" @@ -28,7 +42,7 @@ diff -Nur chkrootkit-0.44.orig/chkrootkit chkrootkit-0.44/chkrootkit return ${NOT_TESTED} fi -@@ -176,32 +176,32 @@ +@@ -187,32 +187,32 @@ fi if [ "${EXPERT}" = "t" ]; then @@ -40,7 +54,7 @@ diff -Nur chkrootkit-0.44.orig/chkrootkit chkrootkit-0.44/chkrootkit - if ./chklastlog -f ${WTMP} -l ${LASTLOG} + if /usr/bin/chkrootkit-chklastlog -f ${WTMP} -l ${LASTLOG} then - if [ "${QUIET}" != "t" ]; then echo "nothing deleted"; fi + if [ "${QUIET}" != "t" ]; then echo "chklastlog: nothing deleted"; fi fi } @@ -68,8 +82,8 @@ diff -Nur chkrootkit-0.44.orig/chkrootkit chkrootkit-0.44/chkrootkit + if /usr/bin/chkrootkit-check_wtmpx then if [ "${QUIET}" != "t" ]; then \ - echo "nothing deleted in /var/adm/wtmpx"; fi -@@ -212,12 +212,12 @@ + echo "check_wtmpx: nothing deleted in /var/adm/wtmpx"; fi +@@ -223,12 +223,12 @@ WTMP=`loc wtmp wtmp "${ROOTDIR}var/log ${ROOTDIR}var/adm"` if [ "${EXPERT}" = "t" ]; then @@ -82,20 +96,20 @@ diff -Nur chkrootkit-0.44.orig/chkrootkit chkrootkit-0.44/chkrootkit - if ./chkwtmp -f ${WTMP} + if /usr/bin/chkrootkit-chkwtmp -f ${WTMP} then - if [ "${QUIET}" != "t" ]; then echo "nothing deleted"; fi + if [ "${QUIET}" != "t" ]; then echo "chkwtmp: nothing deleted"; fi fi -@@ -256,8 +256,8 @@ +@@ -267,8 +267,8 @@ prog="" if [ \( "${SYSTEM}" = "Linux" -o \( "${SYSTEM}" = "FreeBSD" -a \ `echo ${V} | ${awk} '{ if ($1 > 4.3) print 1; else print 0 }'` -eq 1 \) \) -a "${ROOTDIR}" = "/" ]; then - [ ! -x ./chkproc ] && prog="./chkproc" - [ ! -x ./chkdirs ] && prog="$prog ./chkdirs" -+ [ ! -x /usr/bin/chkproc ] && prog="/usr/bin/chkrootkit-chkproc" -+ [ ! -x /usr/bin/chkdirs ] && prog="$prog /usr/bin/chkrootkit-chkdirs" ++ [ ! -x /usr/bin/chkrootkit-chkproc ] && prog="/usr/bin/chkrootkit-chkproc" ++ [ ! -x /usr/bin/chkrootkit-chkdirs ] && prog="$prog /usr/bin/chkrootkit-chkdirs" if [ "$prog" != "" ]; then # echo "not tested: can't exec $prog" return ${NOT_TESTED} -@@ -269,7 +269,7 @@ +@@ -280,7 +280,7 @@ PV=`$ps -V 2>/dev/null| $cut -d " " -f 3 |$awk -F . '{ print $1 "." $2 $3 }' | ${awk} '{ if ($0 > 3.19) print 2; else print 1 }'` [ "$PV" = "" ] && PV=1 [ "${SYSTEM}" = "SunOS" ] && PV=0 @@ -104,16 +118,16 @@ diff -Nur chkrootkit-0.44.orig/chkrootkit chkrootkit-0.44/chkrootkit return 5 fi -@@ -295,7 +295,7 @@ +@@ -306,7 +306,7 @@ if [ "${DEBUG}" = "t" ]; then - ${echo} "*** $PV ***" + ${echo} "*** PV=$PV ***" fi - if ./chkproc -p ${PV} + if /usr/bin/chkrootkit-chkproc -p ${PV} then - if [ "${QUIET}" != "t" ]; then echo "nothing detected"; fi + if [ "${QUIET}" != "t" ]; then echo "chkproc: nothing detected"; fi else -@@ -1534,18 +1534,18 @@ +@@ -1582,18 +1582,18 @@ if [ "${SYSTEM}" = "Linux" ] then diff --git a/chkrootkit-nostrip.patch b/chkrootkit-nostrip.patch index 850a9a4..ad2efd1 100644 --- a/chkrootkit-nostrip.patch +++ b/chkrootkit-nostrip.patch @@ -1,7 +1,6 @@ -diff -Nur chkrootkit-0.43.orig/Makefile chkrootkit-0.43/Makefile ---- chkrootkit-0.43.orig/Makefile 2003-12-26 22:34:10.000000000 +0100 -+++ chkrootkit-0.43/Makefile 2003-12-30 08:45:32.080634896 +0100 -@@ -35,31 +35,24 @@ +--- chkrootkit-0.45/Makefile~ 2005-02-22 00:13:55.000000000 +0100 ++++ chkrootkit-0.45/Makefile 2005-02-23 16:01:36.942576240 +0100 +@@ -35,36 +35,28 @@ chklastlog: chklastlog.c ${CC} ${CFLAGS} -o $@ chklastlog.c @@ -12,7 +11,7 @@ diff -Nur chkrootkit-0.43.orig/Makefile chkrootkit-0.43/Makefile - @strip $@ ifpromisc: ifpromisc.c - ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ifpromisc.c + ${CC} ${CFLAGS} ${LDFLAGS} -D_FILE_OFFSET_BITS=64 -o $@ ifpromisc.c - @strip $@ chkproc: chkproc.c @@ -27,9 +26,14 @@ diff -Nur chkrootkit-0.43.orig/Makefile chkrootkit-0.43/Makefile ${CC} ${LDFLAGS} -o $@ check_wtmpx.c - @strip $@ + chkutmp: chkutmp.c + ${CC} ${LDFLAGS} -o $@ chkutmp.c +- @strip $@ + + strings-static: strings.c ${CC} ${STATIC} ${LDFLAGS} -o $@ strings.c - @strip $@ clean: - rm -f ${OBJS} core chklastlog chkwtmp ifpromisc chkproc chkdirs check_wtmpx strings-static + rm -f ${OBJS} core chklastlog chkwtmp ifpromisc chkproc chkdirs check_wtmpx strings-static chkutmp diff --git a/chkrootkit-utmpx.patch b/chkrootkit-utmpx.patch new file mode 100644 index 0000000..53a1fba --- /dev/null +++ b/chkrootkit-utmpx.patch @@ -0,0 +1,11 @@ +--- chkrootkit-0.45/chkutmp.c~ 2005-02-22 00:10:19.000000000 +0100 ++++ chkrootkit-0.45/chkutmp.c 2005-02-23 16:58:58.898319432 +0100 +@@ -50,7 +49,7 @@ + #define PS_CMD 0 + #else + #define PS_CMD 1 +-#define UTMP "/var/run/utmp" ++#define UTMP "/var/run/utmpx" + #endif + + struct ps_line { diff --git a/chkrootkit.spec b/chkrootkit.spec index 304a228..77cb04d 100644 --- a/chkrootkit.spec +++ b/chkrootkit.spec @@ -1,12 +1,12 @@ Summary: chkrootkit - locally checks for signs of a rootkit Summary(pl): chkrootkit - narzêdzie do lokalnego szukania oznak rootkitów Name: chkrootkit -Version: 0.44 +Version: 0.45 Release: 1 License: AMS (BSD like; look at COPYRIGHT) Group: Applications/Networking -Source0: ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit-0.44.tar.gz -# Source0-md5: 8f6dbb3204c24e9b71490142cb2953ee +Source0: ftp://ftp.pangeia.com.br/pub/seg/pac/%{name}-%{version}.tar.gz +# Source0-md5: 57493e24ca81750a200d8bcb4049e858 Source1: %{name}-check Source2: %{name}.sysconfig Patch0: %{name}-CC.patch @@ -14,7 +14,7 @@ Patch1: %{name}-nostrip.patch Patch2: %{name}-names.patch Patch3: %{name}-wtmp.patch Patch4: %{name}-usebash.patch -Patch5: http://www.rootshell.be/~unspawn/packaging/%{name}-0.42-ip.patch +Patch5: %{name}-utmpx.patch # Patch5-md5: 0dfeda71b081eaa8c316eca1f81b21f0 URL: http://www.chkrootkit.org/ BuildRequires: glibc-static @@ -60,7 +60,7 @@ Pakiet ten jest przestarza %patch2 -p1 %patch3 -p1 %patch4 -p1 -#%patch5 -p0 +%patch5 -p1 %build CC="%{__cc}" @@ -71,7 +71,7 @@ export CC rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_bindir},/etc/{sysconfig,cron.weekly}} -for x in check_wtmpx chkdirs chklastlog chkproc chkwtmp ifpromisc strings-static; do +for x in check_wtmpx chkdirs chklastlog chkproc chkwtmp ifpromisc strings-static chkutmp; do install $x $RPM_BUILD_ROOT%{_bindir}/%{name}-$x done -- 2.44.0