From: Richard Lewis <richard.lewis.debian@googlemail.com>
Date: Sun, 8 Sep 2024 14:07:29 +0300
Subject: chkrootkit: chk_ldsopreload

Pass paths with better quoting

NB: this test is not actually doing anything - seems to be missing a
grep after strings-static? (this is an upstream issue, but the fix is
unclear)

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

diff --git a/chkrootkit b/chkrootkit
index f4be64b..6f2863b 100755
--- a/chkrootkit
+++ b/chkrootkit
@@ -1951,15 +1951,16 @@ chk_killall () {
     return "${STATUS}"
 }
 
+# this seems to be missing a grep after strings? currently just
+# testing if the files exist
 chk_ldsopreload() {
    STATUS=${NOT_INFECTED}
-   CMD="${ROOTDIR}lib/libshow.so ${ROOTDIR}lib/libproc.a"
 
    if [ "${SYSTEM}" = "Linux" ]
    then
       if [ ! -x ./strings-static ]; then
-        printn "can't exec ./strings-static, "
-        return ${NOT_TESTED}
+        _warn "ldsopreload not tested: can't exec ./strings-static"
+        return "${NOT_TESTED}"
       fi
 
       if [ "${EXPERT}" = "t" ]; then
@@ -1968,14 +1969,14 @@ chk_ldsopreload() {
       fi
 
       ### strings must be a statically linked binary.
-      if ./strings-static -a ${CMD} > /dev/null 2>&1
+      if ./strings-static -a "${ROOTDIR}lib/libshow.so" "${ROOTDIR}lib/libproc.a" > /dev/null 2>&1
       then
          STATUS=${INFECTED}
       fi
    else
      STATUS=${NOT_TESTED}
    fi
-   return ${STATUS}
+   return "${STATUS}"
 }
 
 chk_basename () {
