Package: amanda-server
Version: 1:2.5.1p1-2.1
Severity: normal
File: /usr/sbin/amoverview
Tags: patch
Hello again! I have another one-liner fix for amanda-server's
amoverview script. I would have included it in the previous bug
report (#447982), but it only shows up after a failed dump.
Symptom:
amoverview does not reports errors (E).
Analysis:
This bug will only be apparent if earlier Debian Bug #447982 is
corrected. The amoverview perl script uses the quotewords()
function to parse the output of "amadmin find". quotewords()
stumbles on strings with apostrophes (e.g. "can't dump no-hold disk
in degraded mode") which are interpreted as single quotes that open
but never close and returns an empty list.
Correction:
One line in perl script (attached patch) will escape single quotes
(apostrophes) as "\'" before calling quotewords(). This patch is
applied to sources after the patch from Bug #447982.
Caveat:
I am unaware of instances where single-quoted strings would appear
in the "amadmin find" results. Looking though server-src/find.c, I
see no place where results are quoted.
Best regards,
Stephen Benoit
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.20
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Versions of packages amanda-server depends on:
ii amanda-common 1:2.5.1p1-2.1 Advanced Maryland Automatic Networ
ii libc6 2.3.6.ds1-13etch2 GNU C Library: Shared libraries
ii libncurses5 5.5-5 Shared libraries for terminal hand
ii libreadline5 5.2-2 GNU readline and history libraries
ii mailx 1:8.1.2-0.20050715cvs-1 A simple mail user agent
amanda-server recommends no packages.
-- no debconf information
--- amanda-2.5.1p1.orig/server-src/amoverview.pl.in 2007-10-26
14:21:16.000000000 -0400
+++ amanda-2.5.1p1/server-src/amoverview.pl.in 2007-10-26 14:24:37.000000000
-0400
@@ -126,6 +126,7 @@
next if /found Amanda directory/;
next if /skipping cruft directory/;
next if /skip-incr/;
+ s#\'#\\\'#g;
($date, $host, $disk, $level, $tape, $file, $part, $status) =
quotewords('\s+', 0, $_);
next if $date eq 'date';
next if $date eq 'Warning:';