Blame SOURCES/logwatch-secure-userhelper.patch

bcfbf2
Fix misparsing of userhelper log entries for hddtemp that specify a device
bcfbf2
using a name that includes a slash (e.g. '/usr/sbin/hddtemp -n -q /dev/sda').
bcfbf2
Additional slashes after the process name confuse logwatch as it considers the
bcfbf2
last word behind the last slash the process' name.
bcfbf2
bcfbf2
Author: Jan Synacek <jsynacek@redhat.com>
bcfbf2
RH-Bugzilla: #867290
bcfbf2
bcfbf2
--- logwatch-svn110/scripts/services/secure.orig	2012-10-18 11:13:33.000000000 +0200
bcfbf2
+++ logwatch-svn110/scripts/services/secure	2012-10-18 11:31:08.987571713 +0200
bcfbf2
@@ -843,8 +843,13 @@ if (keys %Executed_app) {
bcfbf2
    print "\nUserhelper executed applications:\n";
bcfbf2
    foreach (keys %Executed_app) {
bcfbf2
      ($longapp,$asuser,$user) = split ",";
bcfbf2
+     $longapp_orig = $longapp;
bcfbf2
+     $i = index($longapp, " ");
bcfbf2
+     if ($i > 0) {
bcfbf2
+        $longapp = substr($longapp, 0, $i);
bcfbf2
+     }
bcfbf2
      $app = substr($longapp,rindex($longapp,"/")+1);
bcfbf2
-     print "   $user -> $app as $asuser:  ".$Executed_app{"$longapp,$asuser,$user"}." Time(s)\n";
bcfbf2
+     print "   $user -> $app as $asuser:  ".$Executed_app{"$longapp_orig,$asuser,$user"}." Time(s)\n";
bcfbf2
    }
bcfbf2
 }
bcfbf2