File: chkrootkit-chk_rshd.patch

package info (click to toggle)
chkrootkit 0.58b-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 7,796 kB
  • sloc: sh: 187,095; ansic: 3,779; makefile: 103
file content (49 lines) | stat: -rw-r--r-- 1,558 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From: Richard Lewis <richard.lewis.debian@googlemail.com>
Date: Thu, 17 Oct 2024 22:32:09 +0100
Subject: chkrootkit: chk_rshd

Forwarded: yes
(Forwarded by email: 21 Dec 2024)
---
 chkrootkit | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/chkrootkit b/chkrootkit
index 36de5f6..032e5c0 100755
--- a/chkrootkit
+++ b/chkrootkit
@@ -2597,11 +2597,11 @@ chk_rshd () {
     case "${SYSTEM}" in
        Linux) CMD="${ROOTDIR}usr/sbin/in.rshd";;
        FreeBSD) CMD="${ROOTDIR}usr/libexec/rshd";;
-       *) CMD=`loc rshd rshd $pth`;;
+       *) CMD=$(loc rshd rshd "$pth");;
     esac
 
-    if [ ! -x ${CMD} ] ;then
-       return ${NOT_FOUND}
+    if [ ! -x "${CMD}" ] ;then
+       return "${NOT_FOUND}"
     fi
     if [ "${EXPERT}" = "t" ]; then
         expertmode_output "${strings} -a ${CMD}"
@@ -2609,15 +2609,15 @@ chk_rshd () {
     fi
 
     RSHD_INFECTED_LABEL="HISTFILE"
-    if ${strings} -a ${CMD} | ${egrep} "${RSHD_INFECTED_LABEL}" > /dev/null 2>&1
+    if "${strings}" -a "${CMD}" | ${egrep} "${RSHD_INFECTED_LABEL}" > /dev/null 2>&1
     then
         STATUS=${INFECTED}
-        if ${egrep} "^#.*rshd" ${ROOTDIR}etc/inetd.conf >/dev/null 2>&1 -o \
-            ${ls} ${ROOTDIR}etc/xinetd.d/rshd >/dev/null 2>&1 ; then
+        if ${egrep} "^#.*rshd" "${ROOTDIR}etc/inetd.conf" >/dev/null 2>&1 -o \
+            "${ls}" "${ROOTDIR}etc/xinetd.d/rshd" >/dev/null 2>&1 ; then
            STATUS=${INFECTED_BUT_DISABLED}
         fi
     fi
-    return ${STATUS}
+    return "${STATUS}"
 }
 
 chk_tcpdump () {