[Logcheck-commits] Hannes von Haugwitz: s/logcheck-test: allow symbolic link as rule file

Hannes von Haugwitz hvh-guest at alioth.debian.org
Mon Jul 4 16:45:13 UTC 2011


Module: logcheck
Branch: master
Commit: 5878e454a34bf85498f36944a1a8e05905388876
URL:    http://git.debian.org/?p=logcheck/logcheck.git;a=commit;h=5878e454a34bf85498f36944a1a8e05905388876

Author: Hannes von Haugwitz <hannes at vonhaugwitz.com>
Date:   Mon Jul  4 18:42:02 2011 +0200

s/logcheck-test: allow symbolic link as rule file

---

 debian/changelog  |    2 ++
 src/logcheck-test |    6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index ec04b01..82fb310 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -52,6 +52,8 @@ logcheck (1.3.14) unstable; urgency=low
   * ignore.d.server/spamd:
     - adjusted 'child cleanup' rule to match new format, thanks to Enno Gröper
       (closes: #632471)
+  * src/logcheck-test:
+    - allow symbolic link as rule file
 
   [ Gerfried Fuchs ]
   * Remove myself from uploaders.
diff --git a/src/logcheck-test b/src/logcheck-test
index ec1a194..0254d5c 100755
--- a/src/logcheck-test
+++ b/src/logcheck-test
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright © 2007–2010 Hannes von Haugwitz <hannes at vonhaugwitz.com>
+# Copyright © 2007–2011 Hannes von Haugwitz <hannes at vonhaugwitz.com>
 
 # This file is part of Logcheck
 
@@ -69,8 +69,8 @@ while [ -n "${1:-}" ]; do
                 exit 4
             else
                 RULEFILE="$1"
-                if ! [ -f "$RULEFILE" ] ; then
-                    err "'$RULEFILE' is no regular file"
+                if ! [ -f "$RULEFILE" -o -L "$RULEFILE" ] ; then
+                    err "'$RULEFILE' is nor a regular file nor a symbolic link"
                     exit 5
                 elif ! [ -r "$RULEFILE" ] ; then
                     err "'$RULEFILE' permission denied"




More information about the Logcheck-commits mailing list