[Forensics-changes] [rkhunter] 01/02: Remove full path from maintainer script

Francois Marier francois at moszumanska.debian.org
Sat Aug 22 06:25:32 UTC 2015


This is an automated email from the git hooks/post-receive script.

francois pushed a commit to branch master
in repository rkhunter.

commit aba78a8583603b63ef81ae791e1c396f16f22bb3
Author: Francois Marier <francois at debian.org>
Date:   Fri Aug 21 23:18:02 2015 -0700

    Remove full path from maintainer script
---
 debian/changelog |  7 +++++++
 debian/config    | 16 +++++++++++++++-
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 739f97a..163662a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+rkhunter (1.4.2-4) unstable; urgency=medium
+
+  [ Gavin Porter ]
+  * Remove full path from maintainer script
+
+ -- Francois Marier <francois at debian.org>  Fri, 21 Aug 2015 23:13:23 -0700
+
 rkhunter (1.4.2-3) unstable; urgency=medium
 
   * Fix the logcheck rule for slow scans (closes: #788908)
diff --git a/debian/config b/debian/config
index 9704b09..2261cb7 100644
--- a/debian/config
+++ b/debian/config
@@ -13,7 +13,21 @@ if [ -r /etc/default/rkhunter ]; then
         db_set rkhunter/apt_autogen "$APT_AUTOGEN"
 fi
 
+# POSIX-compliant shell function to check the path for an executable
+pathfind() {
+    OLDIFS="$IFS"
+    IFS=:
+    for p in $PATH; do
+        if [ -x "$p/$*" ]; then
+            IFS="$OLDIFS"
+            return 0
+        fi
+    done
+    IFS="$OLDIFS"
+    return 1
+}
+
 db_input medium rkhunter/cron_daily_run || true
-[ -x /usr/bin/wget ] || [ -x /usr/bin/curl ] || [ -x /usr/bin/links ] || [ -x /usr/bin/elinks ] || [ -x /usr/bin/lynx ] && db_input medium rkhunter/cron_db_update || true
+pathfind wget || pathfind curl || pathfind links || pathfind elinks || pathfind lynx && db_input medium rkhunter/cron_db_update || true
 db_input medium rkhunter/apt_autogen || true
 db_go || true

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/rkhunter.git



More information about the forensics-changes mailing list